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

Unified Diff: gm/image.cpp

Issue 1199473002: change old picture serialization to really handle images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix check in new_array function Created 5 years, 6 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 | « gm/factory.cpp ('k') | include/c/sk_image.h » ('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 c420c95eef5834977521bf533a71f2c2ba1fde51..5e840fbb2f8922b165db0f9364de8ddfe9b96010 100644
--- a/gm/image.cpp
+++ b/gm/image.cpp
@@ -24,7 +24,7 @@ static void drawJpeg(SkCanvas* canvas, const SkISize& size) {
if (NULL == data.get()) {
return;
}
- SkImage* image = SkImage::NewFromData(data);
+ SkImage* image = SkImage::NewFromEncoded(data);
if (image) {
SkAutoCanvasRestore acr(canvas, true);
canvas->scale(size.width() * 1.0f / image->width(),
« no previous file with comments | « gm/factory.cpp ('k') | include/c/sk_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698