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

Unified Diff: tools/pinspect.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/lua/lua_pictures.cpp ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/pinspect.cpp
diff --git a/tools/pinspect.cpp b/tools/pinspect.cpp
index f6304e6b40a2092527a1c97a194ffde689a7e054..969d87c4fed94c7e49b79a3c6c0e89368faf34a6 100644
--- a/tools/pinspect.cpp
+++ b/tools/pinspect.cpp
@@ -40,11 +40,10 @@ static SkPicture* inspect(const char path[]) {
}
stream.rewind();
- bool success = false;
- SkPicture* pic = SkNEW_ARGS(SkPicture, (&stream, &success, &lazy_decode_bitmap));
- if (!success) {
+ SkPicture* pic = SkPicture::CreateFromStream(&stream, &lazy_decode_bitmap);
+ if (NULL == pic) {
SkDebugf("Could not create SkPicture: %s\n", path);
- return pic;
+ return NULL;
}
printf("picture size:[%d %d]\n", pic->width(), pic->height());
return pic;
« no previous file with comments | « tools/lua/lua_pictures.cpp ('k') | tools/render_pdfs_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698