diff options
author | reed <reed@google.com> | 2016-08-20 07:59:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-20 07:59:19 -0700 |
commit | 589a39eb81d25fa7af95e7366db17ac7a70a7d03 (patch) | |
tree | f1f485df0476ca0af26475c924d35101b9160b6b /src/pdf | |
parent | e2348ccb477b97847cd147161a57fbbbfc8bba10 (diff) |
store info in basedevice, change getter to non-virtual const&
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261003003
Review-Url: https://codereview.chromium.org/2261003003
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 8 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.h | 2 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index edf17280ef..73d41b1c36 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); } diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h index 4a860281e3..6588efb8d1 100644 --- a/src/pdf/SkPDFDevice.h +++ b/src/pdf/SkPDFDevice.h @@ -119,8 +119,6 @@ public: void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const SkPaint&) override; - SkImageInfo imageInfo() const override; - // PDF specific methods. /** Create the resource dictionary for this device. */ |