aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-04-15 13:05:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-15 13:05:18 -0700
commit00b7e5eb973a1b1e4d1affa74fc0341e8c41e3da (patch)
treee298e46f76cff865e49544d2b0a4349d4112c034 /src
parent221360a514fb4bfff5b461e83262306b2a0f36af (diff)
SkPDF/Device/ImageFilter: Fix ImageFilter fallback code
Broken in https://chromium.googlesource.com/skia/+/76033be I have confirmed that this fixes 470083. BUG=470083 Review URL: https://codereview.chromium.org/1080923004
Diffstat (limited to 'src')
-rw-r--r--src/core/SkDeviceImageFilterProxy.h3
-rw-r--r--src/pdf/SkPDFDevice.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/SkDeviceImageFilterProxy.h b/src/core/SkDeviceImageFilterProxy.h
index 06df759bc3..dcf12f7c40 100644
--- a/src/core/SkDeviceImageFilterProxy.h
+++ b/src/core/SkDeviceImageFilterProxy.h
@@ -22,7 +22,8 @@ public:
SkBaseDevice* createDevice(int w, int h) override {
SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h),
SkBaseDevice::kNever_TileUsage,
- kUnknown_SkPixelGeometry);
+ kUnknown_SkPixelGeometry,
+ true /*forImageFilter*/);
return fDevice->onCreateDevice(cinfo, NULL);
}
bool canHandleImageFilter(const SkImageFilter* filter) override {
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 5167474f10..1b16397512 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -577,7 +577,8 @@ static bool not_supported_for_layers(const SkPaint& layerPaint) {
}
SkBaseDevice* SkPDFDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint* layerPaint) {
- if (layerPaint && not_supported_for_layers(*layerPaint)) {
+ if (cinfo.fForImageFilter ||
+ (layerPaint && not_supported_for_layers(*layerPaint))) {
return SkBitmapDevice::Create(cinfo.fInfo);
}
SkISize size = SkISize::Make(cinfo.fInfo.width(), cinfo.fInfo.height());