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

Unified Diff: samplecode/SamplePicture.cpp

Issue 93703004: Change SkDecodingImageGenerator API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebased Created 6 years, 12 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 | « include/core/SkImageGenerator.h ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SamplePicture.cpp
diff --git a/samplecode/SamplePicture.cpp b/samplecode/SamplePicture.cpp
index af06e823b8d500cbe91a5f745dbbf754a554ce58..767fd617a34e3db8f792487493db806cda0f1f20 100644
--- a/samplecode/SamplePicture.cpp
+++ b/samplecode/SamplePicture.cpp
@@ -40,7 +40,8 @@ static SkBitmap load_bitmap() {
SkString path = SkOSPath::SkPathJoin(directory.c_str(), "mandrill_512.png");
SkAutoDataUnref data(SkData::NewFromFileName(path.c_str()));
if (data.get() != NULL) {
- SkDecodingImageGenerator::Install(data.get(), &bm);
+ SkInstallDiscardablePixelRef(SkDecodingImageGenerator::Create(
+ data, SkDecodingImageGenerator::Options()), &bm, NULL);
}
return bm;
}
« no previous file with comments | « include/core/SkImageGenerator.h ('k') | src/image/SkImagePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698