add png to makefile for linux
git-svn-id: http://skia.googlecode.com/svn/trunk@551 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/Makefile b/Makefile
index afc62c9..aebe467 100644
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,7 @@
# these are our registry-based factories
SRC_LIST += src/images/SkImageDecoder_Factory.cpp
SRC_LIST += src/images/SkImageEncoder_Factory.cpp
+ SRC_LIST += src/images/SkImageDecoder_libpng.cpp
# support files
SRC_LIST += src/images/SkScaledBitmapSampler.cpp
endif
diff --git a/tools/skhello.cpp b/tools/skhello.cpp
index 6f56d4c..179c3da 100644
--- a/tools/skhello.cpp
+++ b/tools/skhello.cpp
@@ -57,9 +57,11 @@
SkIntToScalar(w)/2, SkIntToScalar(h)*2/3,
paint);
- SkImageEncoder::EncodeFile(path.c_str(), bitmap,
+ bool success = SkImageEncoder::EncodeFile(path.c_str(), bitmap,
SkImageEncoder::kPNG_Type, 100);
-
- return 0;
+ if (!success) {
+ SkDebugf("--- failed to write %s\n", path.c_str());
+ }
+ return !success;
}