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; |