skia2/include/effects
senorblanco@chromium.org ee845ae494 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
2014-04-01 19:15:23 +00:00
..
Sk1DPathEffect.h Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
Sk2DPathEffect.h Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
SkAlphaThresholdFilter.h Add AlphaThreshold filter. 2014-01-06 23:41:14 +00:00
SkArithmeticMode.h Initial error handling code 2013-10-23 17:06:21 +00:00
SkAvoidXfermode.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkBicubicImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkBitmapSource.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkBlurDrawLooper.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkBlurImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkBlurMaskFilter.h Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
SkColorFilterImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkColorMatrix.h Revert of Revert "Serialization of SkPictureImageFilter" (https://codereview.chromium.org/153583007/) 2014-02-07 12:20:04 +00:00
SkColorMatrixFilter.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkComposeImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkCornerPathEffect.h Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
SkDashPathEffect.h Remove scaleToFit from DashPathEffect 2014-03-31 18:52:51 +00:00
SkDiscretePathEffect.h Factory methods for heap-allocated SkPathEffect and SkXfermode objects. 2014-02-20 20:40:19 +00:00
SkDisplacementMapEffect.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkDrawExtraPathEffect.h Export effects classes with SK_API. 2012-10-12 14:41:39 +00:00
SkDropShadowImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkEmbossMaskFilter.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkGradientShader.h Add flag to gradients to interpolate colors in premul space. Experimental API to encapsulate the shared parameters for all gradients into a struct. 2013-05-24 14:58:44 +00:00
SkKernel33MaskFilter.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkLayerDrawLooper.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkLayerRasterizer.h Builder class for SkLayerRasterizer. 2014-02-26 13:27:37 +00:00
SkLerpXfermode.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkLightingImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkLumaColorFilter.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkMagnifierImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkMatrixConvolutionImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkMatrixImageFilter.h Implement a generic matrix transform image filter. 2014-03-25 17:35:10 +00:00
SkMergeImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkMorphologyImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkOffsetImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkPaintFlagsDrawFilter.h change SkDrawFilter::filter to return a bool, where false means don't-draw 2012-11-26 20:26:54 +00:00
SkPerlinNoiseShader.h SkPerlinNoiseShader::CreateTubulenceNoise() is misspelled 2014-04-01 16:09:37 +00:00
SkPictureImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkPixelXorXfermode.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkPorterDuff.h Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
SkRectShaderImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkResizeImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkStippleMaskFilter.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkTableColorFilter.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkTableMaskFilter.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkTestImageFilters.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkTileImageFilter.h Implement support for a Context parameter in image filters 2014-03-14 15:44:01 +00:00
SkTransparentShader.h Allow toString capability to be toggled independent of developer mode. 2014-03-13 18:02:17 +00:00
SkXfermodeImageFilter.h Fix SkXfermodeImageFilter when an input is cropped out. 2014-04-01 19:15:23 +00:00