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

Unified Diff: samplecode/DecodeFile.h

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: samplecode/DecodeFile.h
diff --git a/samplecode/DecodeFile.h b/samplecode/DecodeFile.h
index 26d5d2dc2631407b524ced92c462c189e6a4c4ae..3995238bd04208324fb1539e1190a136ded05465 100644
--- a/samplecode/DecodeFile.h
+++ b/samplecode/DecodeFile.h
@@ -12,8 +12,8 @@
inline bool decode_file(const char* filename, SkBitmap* bitmap,
SkColorType colorType = kN32_SkColorType, bool requireUnpremul = false) {
SkASSERT(kIndex_8_SkColorType != colorType);
- SkAutoTUnref<SkData> data(SkData::NewFromFileName(filename));
- SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data));
+ sk_sp<SkData> data(SkData::MakeFromFileName(filename));
+ SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(data.get()));
if (!codec) {
return false;
}
« include/core/SkData.h ('K') | « public.bzl ('k') | samplecode/SampleLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698