Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 0cdb70e933bc3dd6cd30bb15d1ad4a06ac627614..26d90f24606c18087e6621d5acc9a2762cc7f034 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -1428,10 +1428,7 @@ Error ViaSerialization::draw( |
sk_sp<SkPicture> pic(recorder.finishRecordingAsPicture()); |
// Serialize it and then deserialize it. |
- SkDynamicMemoryWStream wStream; |
- pic->serialize(&wStream); |
- SkAutoTDelete<SkStream> rStream(wStream.detachAsStream()); |
- sk_sp<SkPicture> deserialized(SkPicture::MakeFromStream(rStream)); |
+ sk_sp<SkPicture> deserialized(SkPicture::MakeFromData(pic->serialize().get())); |
return draw_to_canvas(fSink, bitmap, stream, log, size, [&](SkCanvas* canvas) { |
canvas->drawPicture(deserialized); |