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

Unified Diff: gm/image.cpp

Issue 579923002: Bis: Use SkImage::NewFromGenerator() instead of SkImage::newEncodedData() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/image.cpp
diff --git a/gm/image.cpp b/gm/image.cpp
index e405a053b2ddc5f146aadf32017c5422861c54f9..b775af8b892dc1138290bc553e4cf572d293a2a5 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -8,6 +8,7 @@
#include "gm.h"
#include "SkSurface.h"
#include "SkCanvas.h"
+#include "SkDecodingImageGenerator.h"
#include "SkStream.h"
#include "SkData.h"
@@ -31,7 +32,8 @@ static void drawJpeg(SkCanvas* canvas, const SkISize& size) {
// be exercised on machines other than mike's. Will require a
// rebaseline.
SkAutoDataUnref data(fileToData("/Users/mike/Downloads/skia.google.jpeg"));
- SkImage* image = SkImage::NewEncodedData(data);
+ SkImage* image = SkImage::NewFromGenerator(
+ SkDecodingImageGenerator::Create(data, SkDecodingImageGenerator::Options()));
if (image) {
SkAutoCanvasRestore acr(canvas, true);
canvas->scale(size.width() * 1.0f / image->width(),
« no previous file with comments | « no previous file | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698