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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 2168483003: Deprecate SkDevice::accessBitmap method (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 5 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
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index bcbff3285c16f1336c9cc23306ed3423e24510d1..8370eabd6aa587d61706262e172ff73eff35b2da 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) {
« src/gpu/SkGpuDevice.h ('K') | « src/pdf/SkPDFDevice.h ('k') | src/svg/SkSVGDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698