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