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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 2261003003: store info in basedevice, change getter to non-virtual const& (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 edf17280ef7b4220ab2d0128e562825f9d8a76e2..73d41b1c36ac0e33bbf2a14259db5a230020f2fe 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -559,7 +559,8 @@ private:
////////////////////////////////////////////////////////////////////////////////
SkPDFDevice::SkPDFDevice(SkISize pageSize, SkScalar rasterDpi, SkPDFDocument* doc, bool flip)
- : INHERITED(SkSurfaceProps(0, kUnknown_SkPixelGeometry))
+ : INHERITED(SkImageInfo::MakeUnknown(pageSize.width(), pageSize.height()),
+ SkSurfaceProps(0, kUnknown_SkPixelGeometry))
, fPageSize(pageSize)
, fContentSize(pageSize)
, fExistingClipRegion(SkIRect::MakeSize(pageSize))
@@ -1294,11 +1295,6 @@ void SkPDFDevice::drawDevice(const SkDraw& d, SkBaseDevice* device,
&content.entry()->fContent);
}
-SkImageInfo SkPDFDevice::imageInfo() const {
- SkImageInfo info = SkImageInfo::MakeUnknown(fPageSize.width(), fPageSize.height());
- return info;
-}
-
sk_sp<SkSurface> SkPDFDevice::makeSurface(const SkImageInfo& info, const SkSurfaceProps& props) {
return SkSurface::MakeRaster(info, &props);
}
« include/core/SkDevice.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