DescriptionFix 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
Committed: https://code.google.com/p/skia/source/detail?r=14016
Patch Set 1 #Patch Set 2 : Add unit test #Patch Set 3 : Fix GPU path; fix all-cropped out case; add more test cases #Patch Set 4 : NULL mode can be handled by the generic path too. #Patch Set 5 : Fix whitespace #Patch Set 6 : Check for non-effect xfermodes in canFilterImageGPU #Patch Set 7 : Don't bother checking drawsNothing() #
Messages
Total messages: 5 (0 generated)
|