aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicturePlayback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkPicturePlayback.cpp')
-rw-r--r--src/core/SkPicturePlayback.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
index 898d379578..fe1a037cfc 100644
--- a/src/core/SkPicturePlayback.cpp
+++ b/src/core/SkPicturePlayback.cpp
@@ -520,15 +520,14 @@ void SkPicturePlayback::parseStreamTag(SkStream* stream, const SkPictInfo& info,
case PICT_PICTURE_TAG: {
fPictureCount = size;
fPictureRefs = SkNEW_ARRAY(SkPicture*, fPictureCount);
- bool success;
for (int i = 0; i < fPictureCount; i++) {
- fPictureRefs[i] = SkNEW_ARGS(SkPicture, (stream, &success, proc));
- // Success can only be false if PICTURE_VERSION does not match
+ fPictureRefs[i] = SkPicture::CreateFromStream(stream, proc);
+ // CreateFromStream can only fail if PICTURE_VERSION does not match
// (which should never happen from here, since a sub picture will
// have the same PICTURE_VERSION as its parent) or if stream->read
// returns 0. In the latter case, we have a bug when writing the
// picture to begin with, which will be alerted to here.
- SkASSERT(success);
+ SkASSERT(fPictureRefs[i] != NULL);
}
} break;
case PICT_BUFFER_SIZE_TAG: {