diff options
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 6 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.h | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index bcbff3285c..8370eabd6a 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -658,8 +658,7 @@ SkPDFDevice::SkPDFDevice(SkISize pageSize, SkScalar rasterDpi, SkPDFDocument* do , fDocument(doc) { SkASSERT(pageSize.width() > 0); SkASSERT(pageSize.height() > 0); - fLegacyBitmap.setInfo( - SkImageInfo::MakeUnknown(pageSize.width(), pageSize.height())); + if (flip) { // Skia generally uses the top left as the origin but PDF // natively has the origin at the bottom left. This matrix @@ -1402,7 +1401,8 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkBaseDevice* device, } SkImageInfo SkPDFDevice::imageInfo() const { - return fLegacyBitmap.info(); + SkImageInfo info = SkImageInfo::MakeUnknown(fPageSize.width(), fPageSize.height()); + return info; } void SkPDFDevice::onAttachToCanvas(SkCanvas* canvas) { diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h index ca78663347..f8497c63ff 100644 --- a/src/pdf/SkPDFDevice.h +++ b/src/pdf/SkPDFDevice.h @@ -193,10 +193,6 @@ public: }; protected: - const SkBitmap& onAccessBitmap() override { - return fLegacyBitmap; - } - sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) override; void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData* value) override; @@ -264,8 +260,6 @@ private: SkScalar fRasterDpi; - SkBitmap fLegacyBitmap; - SkPDFDocument* fDocument; //////////////////////////////////////////////////////////////////////////// |