Index: tools/lua/lua_pictures.cpp |
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp |
index eee7088f0d14dc97b012cf0b736e1a37483ab775..58983f4d58f56d9f7f2d6f861bc21918c10d1095 100644 |
--- a/tools/lua/lua_pictures.cpp |
+++ b/tools/lua/lua_pictures.cpp |
@@ -39,8 +39,8 @@ DEFINE_string2(tailFunc, s, "", "Optional lua function to call at end"); |
DEFINE_bool2(quiet, q, false, "Silence all non-error related output"); |
static sk_sp<SkPicture> load_picture(const char path[]) { |
- SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path)); |
- if (stream.get()) { |
+ std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path); |
+ if (stream) { |
return SkPicture::MakeFromStream(stream.get()); |
} |
return nullptr; |