Index: tools/Resources.cpp |
diff --git a/tools/Resources.cpp b/tools/Resources.cpp |
index a2a59029bcc1ad5861854017d00617b0addaa3e9..62b3f9fd0dbaaed934b023a6028172346bbe7c53 100644 |
--- a/tools/Resources.cpp |
+++ b/tools/Resources.cpp |
@@ -28,7 +28,8 @@ void SetResourcePath(const char* resource) { |
bool GetResourceAsBitmap(const char* resource, SkBitmap* dst) { |
SkString resourcePath = GetResourcePath(resource); |
SkAutoTUnref<SkData> resourceData(SkData::NewFromFileName(resourcePath.c_str())); |
- return resourceData && SkInstallDiscardablePixelRef(resourceData, dst); |
+ SkAutoTDelete<SkImageGenerator> gen(SkImageGenerator::NewFromEncoded(resourceData)); |
+ return gen && gen->tryGenerateBitmap(dst); |
hal.canary
2015/09/24 20:18:10
this no longer exercises discardable memory!
reed1
2015/09/25 08:05:16
Yes, discardable bitmaps is a deprecated feature.
|
} |
SkImage* GetResourceAsImage(const char* resource) { |