| Index: src/core/SkPicturePlayback.cpp
|
| diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp
|
| index 8b8c6b0862dad7bb6d0bc643de3b09b0abca4fd7..01dd8598ec797ad0910414d61817bd53fd15504e 100644
|
| --- a/src/core/SkPicturePlayback.cpp
|
| +++ b/src/core/SkPicturePlayback.cpp
|
| @@ -84,13 +84,8 @@ SkPicturePlayback::SkPicturePlayback(const SkPictureRecord& record, bool deepCop
|
| fBoundingHierarchy->flushDeferredInserts();
|
| }
|
|
|
| - {
|
| - size_t size = writer.bytesWritten();
|
| - void* buffer = sk_malloc_throw(size);
|
| - writer.flatten(buffer);
|
| - SkASSERT(!fOpData);
|
| - fOpData = SkData::NewFromMalloc(buffer, size);
|
| - }
|
| + SkASSERT(!fOpData);
|
| + fOpData = writer.snapshotAsData();
|
|
|
| // copy over the refcnt dictionary to our reader
|
| record.fFlattenableHeap.setupPlaybacks();
|
|
|