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

Unified Diff: tools/lua/lua_pictures.cpp

Issue 17113004: Replace SkPicture(SkStream) constructors with a factory. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove a change in behavior Created 7 years, 6 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/filtermain.cpp ('k') | tools/pinspect.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 02b9a57fb4701c66c36fd1b21beffd3b8c04d089..f1bca287ad490dae592c4ed33ef00bf6bbb8053b 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -46,13 +46,7 @@ static SkPicture* load_picture(const char path[]) {
SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path));
SkPicture* pic = NULL;
if (stream.get()) {
- bool success;
- pic = SkNEW_ARGS(SkPicture, (stream.get(), &success,
- &lazy_decode_bitmap));
- if (!success) {
- SkDELETE(pic);
- pic = NULL;
- }
+ pic = SkPicture::CreateFromStream(stream.get(), &lazy_decode_bitmap);
}
return pic;
}
« no previous file with comments | « tools/filtermain.cpp ('k') | tools/pinspect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698