Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index cec782e392f780d7da6603dfc901f36b0ceeca85..e67d4355e4ca4caf4f7605422b2bd73f8b91a3ac 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -194,9 +194,12 @@ |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
-static Error draw_skdocument(const Src& src, SkDocument* doc, SkWStream* dst) { |
- // Print the given DM:Src to a document, breaking on 8.5x11 pages. |
- SkASSERT(doc); |
+PDFSink::PDFSink() {} |
+ |
+Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const { |
+ // Print the given DM:Src to a PDF, breaking on 8.5x11 pages. |
+ SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(dst)); |
+ |
int width = src.size().width(), |
height = src.size().height(); |
@@ -228,27 +231,6 @@ |
return ""; |
} |
-PDFSink::PDFSink() {} |
- |
-Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const { |
- SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(dst)); |
- if (!doc) { |
- return "SkDocument::CreatePDF() returned NULL"; |
- } |
- return draw_skdocument(src, doc.get(), dst); |
-} |
- |
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
- |
-XPSSink::XPSSink() {} |
- |
-Error XPSSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const { |
- SkAutoTUnref<SkDocument> doc(SkDocument::CreateXPS(dst)); |
- if (!doc) { |
- return "SkDocument::CreateXPS() returned NULL"; |
- } |
- return draw_skdocument(src, doc.get(), dst); |
-} |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
SKPSink::SKPSink() {} |