aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy
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/lazy
parent23d432080cb8506bf8e371b1637ce8f2de9c0c05 (diff)
add ImageGenerator::NewFromData to porting layer
Diffstat (limited to 'src/lazy')
-rw-r--r--src/lazy/SkDiscardablePixelRef.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp
index 84152ed188..4b7d47b94d 100644
--- a/src/lazy/SkDiscardablePixelRef.cpp
+++ b/src/lazy/SkDiscardablePixelRef.cpp
@@ -116,7 +116,13 @@ bool SkInstallDiscardablePixelRef(SkImageGenerator* generator, SkBitmap* dst,
return true;
}
-// This is the public API
+// These are the public API
+
bool SkInstallDiscardablePixelRef(SkImageGenerator* generator, SkBitmap* dst) {
return SkInstallDiscardablePixelRef(generator, dst, NULL);
}
+
+bool SkInstallDiscardablePixelRef(SkData* encoded, SkBitmap* dst) {
+ SkImageGenerator* generator = SkImageGenerator::NewFromData(encoded);
+ return generator ? SkInstallDiscardablePixelRef(generator, dst, NULL) : false;
+}