Index: src/lazy/SkDiscardablePixelRef.cpp |
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp |
index 84152ed188a4d32ec2c58f74289da55396b46bda..4b7d47b94d2bb4068f0dfcfbe66b3f752a294b88 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; |
+} |