diff options
author | reed <reed@google.com> | 2014-10-09 05:30:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 05:30:10 -0700 |
commit | 5867736b08d3689356b49f505bcf748c2194a0bc (patch) | |
tree | 4eadf1af738a08dc4313d38a4049e1e9e99f8cf8 /src | |
parent | ce686270f533b9d741ef85661ef9d78517a01b86 (diff) |
use real pdfdevice behind SkDocument
BUG=skia:
TBR=bungeman@google.com
Review URL: https://codereview.chromium.org/645563002
Diffstat (limited to 'src')
-rw-r--r-- | src/doc/SkDocument_PDF.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp index 142099375c..781885dc13 100644 --- a/src/doc/SkDocument_PDF.cpp +++ b/src/doc/SkDocument_PDF.cpp @@ -7,7 +7,7 @@ #include "SkDocument.h" #include "SkPDFDocument.h" -#include "SkPDFDeviceFlattener.h" +#include "SkPDFDevice.h" class SkDocument_PDF : public SkDocument { public: @@ -33,10 +33,10 @@ protected: SkASSERT(NULL == fCanvas); SkASSERT(NULL == fDevice); - SkSize mediaBoxSize; - mediaBoxSize.set(width, height); + SkISize mediaBoxSize; + mediaBoxSize.set(SkScalarRoundToInt(width), SkScalarRoundToInt(height)); - fDevice = SkNEW_ARGS(SkPDFDeviceFlattener, (mediaBoxSize, &trimBox)); + fDevice = SkNEW_ARGS(SkPDFDevice, (mediaBoxSize, mediaBoxSize, SkMatrix::I())); if (fEncoder) { fDevice->setDCTEncoder(fEncoder); } @@ -78,7 +78,7 @@ protected: private: SkPDFDocument* fDoc; - SkPDFDeviceFlattener* fDevice; + SkPDFDevice* fDevice; SkCanvas* fCanvas; SkPicture::EncodeBitmap fEncoder; SkScalar fRasterDpi; |