aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/effects/SkXfermodeImageFilter.h
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-01 19:15:23 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-01 19:15:23 +0000
commitee845ae4940779280a853269d7d797dc9eb89201 (patch)
treeb71229988f2bca3b02a05f3d5d4eb52474ecb729 /include/effects/SkXfermodeImageFilter.h
parent58af0c895f5a18f46e9594d7d170f60c70481f30 (diff)
Fix SkXfermodeImageFilter when an input is cropped out.
If one of inputs to SkXfermodeImageFilter draws nothing, either due to it being cropped out upstream, or within the filter itself, the filter should still draw the other input, since otherwise the result will be incorrect. For the GPU path, since we can't detect this case in canFilterImageGPU() without recursing, we'll just drop to the generic path if either input is empty, since we can't use the effect in that case anyway. While we're at it, let's drop to the generic path if the xfermode can't be expressed as an effect, since the code here was doing a 2-pass render in that case anyway, which is equivalent to what the (xfermode == NULL) case was doing anyway. R=bsalomon@google.com, sugoi@chromium.org Review URL: https://codereview.chromium.org/220723007 git-svn-id: http://skia.googlecode.com/svn/trunk@14016 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/effects/SkXfermodeImageFilter.h')
-rw-r--r--include/effects/SkXfermodeImageFilter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/effects/SkXfermodeImageFilter.h b/include/effects/SkXfermodeImageFilter.h
index cacd9b00b8..a0cb728364 100644
--- a/include/effects/SkXfermodeImageFilter.h
+++ b/include/effects/SkXfermodeImageFilter.h
@@ -37,7 +37,7 @@ public:
SkBitmap* dst,
SkIPoint* offset) const SK_OVERRIDE;
#if SK_SUPPORT_GPU
- virtual bool canFilterImageGPU() const SK_OVERRIDE { return !cropRectIsSet(); }
+ virtual bool canFilterImageGPU() const SK_OVERRIDE;
virtual bool filterImageGPU(Proxy* proxy, const SkBitmap& src, const Context& ctx,
SkBitmap* result, SkIPoint* offset) const SK_OVERRIDE;
#endif