Index: tools/skhello.cpp |
diff --git a/tools/skhello.cpp b/tools/skhello.cpp |
index 55748d2e1bb9b4a2ec5aae35625b97c17b810f91..f452d62e639e1256752e1131dc084b42a2e5a8e3 100644 |
--- a/tools/skhello.cpp |
+++ b/tools/skhello.cpp |
@@ -13,6 +13,7 @@ |
#include "SkGraphics.h" |
#include "SkSurface.h" |
#include "SkImage.h" |
+#include "SkImageEncoder.h" |
#include "SkStream.h" |
#include "SkString.h" |
@@ -37,7 +38,9 @@ static bool do_surface(int w, int h, const char path[], const char text[], |
doDraw(surface->getCanvas(), paint, text); |
SkAutoTUnref<SkImage> image(surface->newImageSnapshot()); |
- SkAutoDataUnref data(image->encode()); |
+ SkAutoDataUnref data(SkImageEncoder::EncodeData(*image, |
+ SkImageEncoder::kPNG_Type, |
+ SkImageEncoder::kDefaultQuality)); |
if (NULL == data.get()) { |
return false; |
} |