skia2/include/effects
senorblanco@chromium.org c4b12f19a4 Implement correct clipping for image filters.
Image filters in Skia currently clip the size of the the offscreen
bitmap used for filtering to the device clip bounds. This means that
any pixel-moving filter (e.g., blur) has edge artifacts at the clip
boundaries. This is problematic for tiling, where a single SkPicture
is played back with a clip set to the tile boundaries.

By implementing the onFilterBounds() traversal, and using it in
saveLayer() when a filter is present, we can clip the layer to the
expanded clip rect. Note that this requires that the traversal be
performed in reverse as compared to computeFastBounds().  (It's also
done in device space, unlike computeFastBounds()).

New test imagefiltersclipped tests pixel-moving filters when clipped
by various clip rects.
New test imageblurtiled tests tiled (compositor-style) rendering of
blurred text. There should be no artifacts at the tile boundaries.

BUG=337831
R=reed@google.com

Review URL: https://codereview.chromium.org/23011012

git-svn-id: http://skia.googlecode.com/svn/trunk@13323 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-05 17:51:22 +00:00
..
Sk1DPathEffect.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
Sk2DPathEffect.h Refactor read and write buffers. 2014-01-30 18:58:24 +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 Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkBicubicImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkBitmapSource.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +00:00
SkBlurDrawLooper.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkBlurImageFilter.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +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 Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkColorMatrix.h Use GrCustomStage to implement color matrix. 2012-10-17 13:36:14 +00:00
SkColorMatrixFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkComposeImageFilter.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +00:00
SkCornerPathEffect.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkDashPathEffect.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkDiscretePathEffect.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkDisplacementMapEffect.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +00:00
SkDrawExtraPathEffect.h Export effects classes with SK_API. 2012-10-12 14:41:39 +00:00
SkDropShadowImageFilter.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +00:00
SkEmbossMaskFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +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 Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkLayerDrawLooper.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkLayerRasterizer.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkLerpXfermode.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkLightingImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkLumaColorFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkMagnifierImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkMatrixConvolutionImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkMergeImageFilter.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +00:00
SkMorphologyImageFilter.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +00:00
SkOffsetImageFilter.h Implement correct clipping for image filters. 2014-02-05 17:51:22 +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 Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkPictureImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkPixelXorXfermode.h Refactor read and write buffers. 2014-01-30 18:58:24 +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 Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkResizeImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkStippleMaskFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +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 Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkTestImageFilters.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkTileImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkTransparentShader.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00
SkXfermodeImageFilter.h Refactor read and write buffers. 2014-01-30 18:58:24 +00:00