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

Unified Diff: samplecode/SampleEncode.cpp

Issue 834633006: add ImageGenerator::NewFromData to porting layer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add helper for SkInstallDiscardablePixelRef(SkData*, ...) Created 5 years, 11 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
Index: samplecode/SampleEncode.cpp
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp
index e65b2d38554196c1b5fb1f95526e22a57f1b51e9..185208b35bd8bece2ddd4d4049594493e4dbbff4 100644
--- a/samplecode/SampleEncode.cpp
+++ b/samplecode/SampleEncode.cpp
@@ -9,7 +9,7 @@
#include "SkView.h"
#include "SkCanvas.h"
#include "SkData.h"
-#include "SkDecodingImageGenerator.h"
+#include "SkImageGenerator.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
#include "SkImageDecoder.h"
@@ -193,10 +193,7 @@ protected:
encoded = fEncodedPNGs[i].get();
}
if (encoded) {
- if (!SkInstallDiscardablePixelRef(
- SkDecodingImageGenerator::Create(encoded,
- SkDecodingImageGenerator::Options()),
- &bm)) {
+ if (!SkInstallDiscardablePixelRef(encoded, &bm)) {
SkDebugf("[%s:%d] failed to decode %s%s\n",
__FILE__, __LINE__,gConfigLabels[i], gExt[j]);
}

Powered by Google App Engine
This is Rietveld 408576698