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

Unified Diff: tools/lua/lua_pictures.cpp

Issue 2343933002: Revert of SkFontData to use smart pointers. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « tools/get_images_from_skps.cpp ('k') | tools/viewer/SKPSlide.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/lua_pictures.cpp
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp
index 58983f4d58f56d9f7f2d6f861bc21918c10d1095..eee7088f0d14dc97b012cf0b736e1a37483ab775 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -39,8 +39,8 @@
DEFINE_bool2(quiet, q, false, "Silence all non-error related output");
static sk_sp<SkPicture> load_picture(const char path[]) {
- std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path);
- if (stream) {
+ SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
+ if (stream.get()) {
return SkPicture::MakeFromStream(stream.get());
}
return nullptr;
« no previous file with comments | « tools/get_images_from_skps.cpp ('k') | tools/viewer/SKPSlide.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698