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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 723743002: move to modify onCreateDevice virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index b14ca729028a60d035b37bf65923f751793af79d..4395daca16711a52b2c56a39f2c6a3d88e571864 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));
}
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698