Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index fe01748fe298990efd2079653891f8c127978331..b44f1d78180e94e9d9f5505789024e5db42c4007 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -1,9 +1,7 @@ |
#include "DMSrcSink.h" |
#include "SamplePipeControllers.h" |
#include "SkCommonFlags.h" |
-#include "SkData.h" |
#include "SkDocument.h" |
-#include "SkImageGenerator.h" |
#include "SkMultiPictureDraw.h" |
#include "SkNullCanvas.h" |
#include "SkOSFile.h" |
@@ -12,11 +10,6 @@ |
#include "SkSVGCanvas.h" |
#include "SkStream.h" |
#include "SkXMLWriter.h" |
- |
-static bool lazy_decode_bitmap(const void* src, size_t size, SkBitmap* dst) { |
- SkAutoTUnref<SkData> encoded(SkData::NewWithCopy(src, size)); |
- return encoded && SkInstallDiscardablePixelRef(encoded, dst); |
-} |
namespace DM { |
@@ -121,7 +114,7 @@ |
if (!stream) { |
return SkStringPrintf("Couldn't read %s.", fPath.c_str()); |
} |
- SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(stream, &lazy_decode_bitmap)); |
+ SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(stream)); |
if (!pic) { |
return SkStringPrintf("Couldn't decode %s as a picture.", fPath.c_str()); |
} |
@@ -386,7 +379,7 @@ |
SkDynamicMemoryWStream wStream; |
pic->serialize(&wStream); |
SkAutoTDelete<SkStream> rStream(wStream.detachAsStream()); |
- SkAutoTUnref<SkPicture> deserialized(SkPicture::CreateFromStream(rStream, &lazy_decode_bitmap)); |
+ SkAutoTUnref<SkPicture> deserialized(SkPicture::CreateFromStream(rStream)); |
// Turn that deserialized picture into a Src, draw it into our Sink to fill bitmap or stream. |
struct ProxySrc : public Src { |