Index: include/core/SkDocument.h |
diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h |
index 316d15a253429ea07c7b40e102a8e22f36e8e6d8..8a797ca6a5d0193d956bf30492d9601041bf4a94 100644 |
--- a/include/core/SkDocument.h |
+++ b/include/core/SkDocument.h |
@@ -16,6 +16,8 @@ |
#include "SkTime.h" |
class SkCanvas; |
+class SkData; |
+class SkPixmap; |
class SkWStream; |
/** SK_ScalarDefaultDPI is 72 DPI. |
@@ -133,6 +135,21 @@ public: |
const SkTime::DateTime* /* creationDate */, |
const SkTime::DateTime* /* modifiedDate */) {} |
+ /** |
+ * For PDF documents, if a DCTEncoder (discrete cosine transform) |
+ * 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 setDCTEncoder(). Chromium |
+ * uses NewFromEncoded. |
+ * |
+ * If the encoder is unset, or if it returns NULL, fall back on |
+ * encoding images with Deflate. |
+ */ |
+ virtual void setDCTEncoder(SkData* (*)(const SkPixmap&)) {} |
+ |
protected: |
SkDocument(SkWStream*, void (*)(SkWStream*, bool aborted)); |