aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf/SkPDFDevice.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-11-12 14:31:11 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-12 14:31:11 -0800
commitb122ee50fb56cf6669fe1668b82c8815896e9943 (patch)
tree2239e51aab15b59943e71ff9b60e86a3b461789b /src/pdf/SkPDFDevice.cpp
parente069400cabd0edd3db52bbf1958063d3ed12ef28 (diff)
start to replace onCreateDevice with onCreateCompatibleDevice
the new virtual takes a struct which we can amend in the future w/o having to update our subclasses in chrome. BUG=skia: NOTRY=True Review URL: https://codereview.chromium.org/723743002
Diffstat (limited to 'src/pdf/SkPDFDevice.cpp')
-rw-r--r--src/pdf/SkPDFDevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index b14ca72902..4395daca16 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -567,19 +567,19 @@ void GraphicStackState::updateDrawingState(const GraphicStateEntry& state) {
}
}
-SkBaseDevice* SkPDFDevice::onCreateDevice(const SkImageInfo& info, Usage usage) {
+SkBaseDevice* SkPDFDevice::onCreateCompatibleDevice(const CreateInfo& cinfo) {
// PDF does not support image filters, so render them on CPU.
// Note that this rendering is done at "screen" resolution (100dpi), not
// printer resolution.
// FIXME: It may be possible to express some filters natively using PDF
// to improve quality and file size (http://skbug.com/3043)
- if (kImageFilter_Usage == usage) {
- return SkBitmapDevice::Create(info);
+ if (kImageFilter_Usage == cinfo.fUsage) {
+ return SkBitmapDevice::Create(cinfo.fInfo);
}
SkMatrix initialTransform;
initialTransform.reset();
- SkISize size = SkISize::Make(info.width(), info.height());
+ SkISize size = SkISize::Make(cinfo.fInfo.width(), cinfo.fInfo.height());
return SkNEW_ARGS(SkPDFDevice, (size, size, initialTransform));
}