Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 39b92cd80021355a8e7283c3f43ad29c5f3b0e76..670588e7200289200f8d4a224fc386265d2064e7 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -6,6 +6,7 @@ |
#include "SkOSFile.h" |
#include "SkPictureRecorder.h" |
#include "SkRandom.h" |
+#include "SkSVGDevice.h" |
#include "SkStream.h" |
namespace DM { |
@@ -226,6 +227,16 @@ Error SKPSink::draw(const Src& src, SkBitmap*, SkWStream* dst) const { |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+SVGSink::SVGSink() {} |
+ |
+Error SVGSink::draw(const Src& src, SkBitmap*, SkWStream* dst) const { |
+ SkAutoTUnref<SkBaseDevice> device(SkSVGDevice::Create(src.size(), dst)); |
+ SkCanvas canvas(device); |
+ return src.draw(&canvas); |
+} |
+ |
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+ |
RasterSink::RasterSink(SkColorType colorType) : fColorType(colorType) {} |
Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*) const { |