Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 4e79c63b4a32e2d866d2e275f4c8249346738534..7979dff9bdfb21345b76319ca4fba1c3197bfe5f 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -197,6 +197,23 @@ Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst) const { |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+SKPSink::SKPSink() {} |
+ |
+Error SKPSink::draw(const Src& src, SkBitmap*, SkWStream* dst) const { |
+ SkSize size; |
+ size = src.size(); |
+ SkPictureRecorder recorder; |
+ Error err = src.draw(recorder.beginRecording(size.width(), size.height())); |
+ if (!err.isEmpty()) { |
+ return err; |
+ } |
+ SkAutoTUnref<SkPicture> pic(recorder.endRecording()); |
+ pic->serialize(dst); |
+ return ""; |
+} |
+ |
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+ |
RasterSink::RasterSink(SkColorType colorType) : fColorType(colorType) {} |
Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*) const { |