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

Unified Diff: samplecode/SampleLua.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: samplecode/SampleLua.cpp
diff --git a/samplecode/SampleLua.cpp b/samplecode/SampleLua.cpp
index 96b15b91b8778f00d26f98fd879cf334cac9879c..4d492f488c493849a72bc609510201a6a1e49124 100644
--- a/samplecode/SampleLua.cpp
+++ b/samplecode/SampleLua.cpp
@@ -60,10 +60,9 @@ public:
fLua = new SkLua;
SkString str = GetResourcePath(LUA_FILENAME);
- SkData* data = SkData::NewFromFileName(str.c_str());
+ sk_sp<SkData> data(SkData::MakeFromFileName(str.c_str()));
if (data) {
fLua->runCode(data->data(), data->size());
- data->unref();
this->setImageFilename(fLua->get());
} else {
fLua->runCode(gMissingCode);
« include/core/SkData.h ('K') | « samplecode/DecodeFile.h ('k') | src/codec/SkIcoCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698