aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-01-07 18:04:45 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-07 18:04:45 -0800
commit5965c8ae4ee960275da4bc40189bdba85aab8b5e (patch)
treedc7f14af5cbce088311191a981b6ae67c2286be6 /src/c
parent23d432080cb8506bf8e371b1637ce8f2de9c0c05 (diff)
add ImageGenerator::NewFromData to porting layer
Diffstat (limited to 'src/c')
-rw-r--r--src/c/sk_surface.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp
index b60596008f..89b53d0a0e 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) {