This patch implements a crop rect for SkImageFilter. It has been implemented for...
authorsenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 24 Jul 2013 22:19:24 +0000 (22:19 +0000)
committersenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 24 Jul 2013 22:19:24 +0000 (22:19 +0000)
commit194d775edcf5fa6e82098a97ad53018d70db1155
tree1398faf08e7031a1338d5ce2e145e7a5b6e1a186
parent91673aafdf227675da15a8b7fabd38dbabdefbb7
This patch implements a crop rect for SkImageFilter. It has been implemented for SkColorFilterImageFilter and SkBlurImageFilter as examples.

In order to preserve the immutability of SkImageFilters, the crop rect is passed as a constructor parameter. If NULL (the default), the bounds of the input image are used, as before.

This also tightens up the boundary handling for SkImageBlurFilter on the GPU backend. Where we were previously using clamping semantics, we now respect decal semantics (so we don't oversaturate the edges). This brings the GPU and raster backends into closer alignment, but will require some new baselines for the GPU tests.

At a minimum, the following tests will need new baselines: imageblur, imagefiltersbase, imagefilterscropped, spritebitmap.

R=reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=10251

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10338 2bbb7eff-a529-9590-31e7-b0007b416f81
17 files changed:
gm/imagefilterscropped.cpp [new file with mode: 0644]
gyp/gmslides.gypi
gyp/tests.gyp
include/core/SkImageFilter.h
include/core/SkRect.h
include/effects/SkBlurImageFilter.h
include/effects/SkColorFilterImageFilter.h
src/core/SkImageFilter.cpp
src/effects/SkBlurImageFilter.cpp
src/effects/SkBlurMaskFilter.cpp
src/effects/SkColorFilterImageFilter.cpp
src/effects/SkGpuBlurUtils.cpp
src/effects/SkGpuBlurUtils.h
src/gpu/SkGpuDevice.cpp
src/gpu/effects/GrConvolutionEffect.cpp
src/gpu/effects/GrConvolutionEffect.h
tests/ImageFilterTest.cpp [new file with mode: 0644]