Index: include/core/SkDocument.h |
diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h |
index 316d15a253429ea07c7b40e102a8e22f36e8e6d8..6ee96b9ce3afed5e69eb1e0fcf20d9a72ac71951 100644 |
--- a/include/core/SkDocument.h |
+++ b/include/core/SkDocument.h |
@@ -16,6 +16,7 @@ |
#include "SkTime.h" |
class SkCanvas; |
+class SkPixelSerializer; |
class SkWStream; |
/** SK_ScalarDefaultDPI is 72 DPI. |
@@ -58,6 +59,24 @@ public: |
SkScalar dpi = SK_ScalarDefaultRasterDPI); |
/** |
+ * @param jpegEncoder For PDF documents, if a jpegEncoder is set, |
+ * use it to encode SkImages and SkBitmaps as [JFIF]JPEGs. |
+ * This feature is deprecated and is only supplied for |
+ * backwards compatability. |
+ * |
+ * The prefered method to create PDFs with JPEG images is |
+ * to use SkImage::NewFromEncoded() and not jpegEncoder. |
+ * Chromium uses NewFromEncoded. |
+ * |
+ * If the encoder is unset, or if jpegEncoder->onEncode() |
+ * returns NULL, fall back on encoding images losslessly |
+ * with Deflate. |
+ */ |
+ static SkDocument* CreatePDF(SkWStream*, |
+ SkScalar dpi, |
+ SkPixelSerializer* jpegEncoder); |
+ |
+ /** |
* Create a PDF-backed document, writing the results into a file. |
*/ |
static SkDocument* CreatePDF(const char outputFilePath[], |