Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: tools/skhello.cpp

Issue 656503003: Move SkImage::encode to SkImageEncoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/KtxTest.cpp ('k') | tools/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « tests/KtxTest.cpp ('k') | tools/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698