Index: include/pdf/SkPDFDevice.h |
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h |
index d668be5df38a05ff0be5ee25670b78dfb6cc7877..e68623e22f0957ac8323ea3a6a07ed21964b9d48 100644 |
--- a/include/pdf/SkPDFDevice.h |
+++ b/include/pdf/SkPDFDevice.h |
@@ -197,6 +197,20 @@ protected: |
virtual bool allowImageFilter(SkImageFilter*) SK_OVERRIDE; |
+ /** |
+ * rasterDpi - the DPI at which features without native PDF support |
+ * will be rasterized (e.g. draw image with perspective, |
+ * draw text with perspective, ...) |
+ * A larger DPI would create a PDF that reflects the original |
+ * intent with better fidelity, but it can make for larger |
+ * PDF files too, which would use more memory while rendering, |
+ * and it would be slower to be processed or sent online or |
+ * to printer. |
+ */ |
+ void setRasterDpi(SkScalar rasterDpi) { |
+ fRasterDpi = rasterDpi; |
vandebo (ex-Chrome)
2013/10/21 16:28:35
nit: you could move the 0 check down to this metho
edisonn
2013/10/21 16:36:34
IMHO it is way easier for a dev to find out the de
|
+ } |
+ |
private: |
// TODO(vandebo): push most of SkPDFDevice's state into a core object in |
// order to get the right access levels without using friend. |
@@ -233,6 +247,7 @@ private: |
SkAutoTDelete<SkPDFGlyphSetMap> fFontGlyphUsage; |
SkPicture::EncodeBitmap fEncoder; |
+ SkScalar fRasterDpi; |
SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack, |
const SkRegion& existingClipRegion); |