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

Unified Diff: src/c/sk_surface.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: src/c/sk_surface.cpp
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp
index b60596008f8abecd87dfaabc2f107ca37acc99d9..89b53d0a0eb80af2d9bebb98b53a0021da45ad99 100644
--- a/src/c/sk_surface.cpp
+++ b/src/c/sk_surface.cpp
@@ -230,18 +230,8 @@ sk_image_t* sk_image_new_raster_copy(const sk_imageinfo_t* cinfo, const void* pi
return (sk_image_t*)SkImage::NewRasterCopy(info, pixels, rowBytes);
}
-#include "SkDecodingImageGenerator.h"
-
sk_image_t* sk_image_new_from_data(const sk_data_t* cdata) {
- SkImageGenerator* gen = NULL;
-#if 0
- // enable this when SkDecodingImageGenerator is available in chrome (decode codecs)
- gen = SkDecodingImageGenerator::Create(AsData(cdata), SkDecodingImageGenerator::Options());
-#endif
- if (NULL == gen) {
- return NULL;
- }
- return ToImage(SkImage::NewFromGenerator(gen));
+ return ToImage(SkImage::NewFromData(AsData(cdata)));
}
sk_data_t* sk_image_encode(const sk_image_t* cimage) {

Powered by Google App Engine
This is Rietveld 408576698