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

Unified Diff: samplecode/SamplePicture.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/SamplePicture.cpp
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index 46c57d7f398133167b839b629f50a822f758be21..c78571a89bbd0e29bbbf7b996831730d29ff177a 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -13,7 +13,7 @@
#include "SkColorFilter.h"
#include "SkColorPriv.h"
#include "SkData.h"
-#include "SkDecodingImageGenerator.h"
+#include "SkImageGenerator.h"
#include "SkDumpCanvas.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
@@ -40,8 +40,7 @@ static SkBitmap load_bitmap() {
SkString pngFilename = GetResourcePath("mandrill_512.png");
SkAutoDataUnref data(SkData::NewFromFileName(pngFilename.c_str()));
if (data.get() != NULL) {
- SkInstallDiscardablePixelRef(SkDecodingImageGenerator::Create(
- data, SkDecodingImageGenerator::Options()), &bm);
+ SkInstallDiscardablePixelRef(data, &bm);
}
return bm;
}

Powered by Google App Engine
This is Rietveld 408576698