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

Unified Diff: gm/image.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: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index 05a3fab2b47e9713e4b570f98911f7357d4bfa58..bd7bbe7952d66a9fd7235094db1085649696195d 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -8,7 +8,6 @@
#include "gm.h"
#include "SkSurface.h"
#include "SkCanvas.h"
-#include "SkDecodingImageGenerator.h"
#include "SkStream.h"
#include "SkData.h"
@@ -24,8 +23,7 @@ static void drawJpeg(SkCanvas* canvas, const SkISize& size) {
if (NULL == data.get()) {
return;
}
- SkImage* image = SkImage::NewFromGenerator(
- SkDecodingImageGenerator::Create(data, SkDecodingImageGenerator::Options()));
+ SkImage* image = SkImage::NewFromData(data);
if (image) {
SkAutoCanvasRestore acr(canvas, true);
canvas->scale(size.width() * 1.0f / image->width(),
« no previous file with comments | « gm/factory.cpp ('k') | gyp/images.gyp » ('j') | include/core/SkImageGenerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698