From: reed Date: Thu, 9 Oct 2014 12:30:10 +0000 (-0700) Subject: use real pdfdevice behind SkDocument X-Git-Tag: submit/tizen/20180928.044319~5512 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5867736b08d3689356b49f505bcf748c2194a0bc;p=platform%2Fupstream%2FlibSkiaSharp.git use real pdfdevice behind SkDocument BUG=skia: TBR=bungeman@google.com Review URL: https://codereview.chromium.org/645563002 --- 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;