Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Unified Diff: tools/Resources.cpp

Issue 2206633004: Move off SK_SUPPORT_LEGACY_DATA_FACTORIES. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Gotta catch 'em all. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698