Index: tools/Resources.cpp |
diff --git a/tools/Resources.cpp b/tools/Resources.cpp |
index 6d3054ab3346689ac6e7373ced96e2e072add9bb..899f5d2bc4332321941777bdf43f2fc1e3888851 100644 |
--- a/tools/Resources.cpp |
+++ b/tools/Resources.cpp |
@@ -27,14 +27,14 @@ void SetResourcePath(const char* resource) { |
bool GetResourceAsBitmap(const char* resource, SkBitmap* dst) { |
SkString resourcePath = GetResourcePath(resource); |
- SkAutoTUnref<SkData> resourceData(SkData::NewFromFileName(resourcePath.c_str())); |
- SkAutoTDelete<SkImageGenerator> gen(SkImageGenerator::NewFromEncoded(resourceData)); |
+ sk_sp<SkData> resourceData(SkData::MakeFromFileName(resourcePath.c_str())); |
+ SkAutoTDelete<SkImageGenerator> gen(SkImageGenerator::NewFromEncoded(resourceData.get())); |
return gen && gen->tryGenerateBitmap(dst); |
} |
sk_sp<SkImage> GetResourceAsImage(const char* resource) { |
SkString path = GetResourcePath(resource); |
- sk_sp<SkData> resourceData(SkData::NewFromFileName(path.c_str())); |
+ sk_sp<SkData> resourceData(SkData::MakeFromFileName(path.c_str())); |
return SkImage::MakeFromEncoded(resourceData); |
} |