Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: src/doc/SkDocument_PDF.cpp

Issue 645563002: use real pdfdevice behind SkDocument (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/doc/SkDocument_PDF.cpp
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp
index 142099375cbf3c5405c6c29d1db320780e170a41..781885dc1317a74fe1ddb883d7b361d5a851968a 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698