Index: samplecode/GMSampleView.cpp |
diff --git a/samplecode/GMSampleView.cpp b/samplecode/GMSampleView.cpp |
index 5e48391787bdab8190d3c6af78905e0ec053928c..19cbcc8b5763abc6a20222cf6572b41f5e0ea949 100644 |
--- a/samplecode/GMSampleView.cpp |
+++ b/samplecode/GMSampleView.cpp |
@@ -47,12 +47,8 @@ bool GMSampleView::onEvent(const SkEvent& evt) { |
} |
#include "SkPicture.h" |
-#include "SkStream.h" |
static sk_sp<SkPicture> round_trip_serialize(SkPicture* src) { |
- SkDynamicMemoryWStream stream; |
- src->serialize(&stream); |
- SkAutoTDelete<SkStream> reader(stream.detachAsStream()); |
- return SkPicture::MakeFromStream(reader); |
+ return SkPicture::MakeFromData(src->serialize().get()); |
} |
#include "SkPictureRecorder.h" |