Index: src/core/SkPicturePlayback.cpp |
diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp |
index b546d397c04617570c7534c1ed338f451abc0af0..f79eb42b9c413feea2ec52d3832384a4b7f10b86 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(); |
mtklein
2014/03/06 18:58:08
Moving this up to / merge this with the other part
iancottrell
2014/03/06 21:31:52
Done.
|
// copy over the refcnt dictionary to our reader |
record.fFlattenableHeap.setupPlaybacks(); |