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

Unified Diff: tools/lua/lua_pictures.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/lua/lua_pictures.cpp
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp
index 9776002e7a6128823994e44dd7111f31360a0c77..eee7088f0d14dc97b012cf0b736e1a37483ab775 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -85,9 +85,9 @@ int tool_main(int argc, char** argv) {
SkLua L(summary);
for (int i = 0; i < FLAGS_luaFile.count(); ++i) {
- SkAutoDataUnref data(SkData::NewFromFileName(FLAGS_luaFile[i]));
- if (nullptr == data.get()) {
- data.reset(SkData::NewEmpty());
+ sk_sp<SkData> data(SkData::MakeFromFileName(FLAGS_luaFile[i]));
+ if (!data) {
+ data = SkData::MakeEmpty();
}
if (!FLAGS_quiet) {
SkDebugf("loading %s...\n", FLAGS_luaFile[i]);
« include/core/SkData.h ('K') | « tools/lua/lua_app.cpp ('k') | tools/skdiff_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698