diff options
author | reed <reed@google.com> | 2015-03-13 07:16:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-13 07:16:09 -0700 |
commit | 1182d9a96b80bd12183ee7c81325a979a51ee0c0 (patch) | |
tree | bae55c614627ea68fe0abe7c31da4f497f1763bf /src/device/xps | |
parent | 511005b2ccf060bd8ca5f078f2c0c7c7da5cc084 (diff) |
Change device creation to see the (optional) layer-paint
Motivation:
PDFDevice currently relies on 1) being told that the layer's paint has an imagefilter, and in the case, it creates a rasterdevice. It then relies on (2) canvas itself sniffing the layer's paint and offering to apply-the-imagefilter to call drawSprite instead of drawDevice.
This subtle interchange is fragile, and also does not support other unsupported PDF features like colorfilters. This CL is a step toward making this use-raster-instead-of-native approach to layers more completely in the subclass' hands.
Review URL: https://codereview.chromium.org/988413003
Diffstat (limited to 'src/device/xps')
-rw-r--r-- | src/device/xps/SkXPSDevice.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp index 2ca799ac37..88d1182526 100644 --- a/src/device/xps/SkXPSDevice.cpp +++ b/src/device/xps/SkXPSDevice.cpp @@ -2251,7 +2251,7 @@ void SkXPSDevice::drawDevice(const SkDraw& d, SkBaseDevice* dev, "Could not add layer to current visuals."); } -SkBaseDevice* SkXPSDevice::onCreateCompatibleDevice(const CreateInfo& info) { +SkBaseDevice* SkXPSDevice::onCreateDevice(const CreateInfo& info, const SkPaint*) { //Conditional for bug compatibility with PDF device. #if 0 if (SkBaseDevice::kGeneral_Usage == info.fUsage) { @@ -2282,6 +2282,3 @@ SkXPSDevice::SkXPSDevice(IXpsOMObjectFactory* xpsFactory) "Could not create canvas for layer."); } -bool SkXPSDevice::allowImageFilter(const SkImageFilter*) { - return false; -} |