DescriptionThis 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
Committed: https://code.google.com/p/skia/source/detail?r=10338
Patch Set 1 #Patch Set 2 : Add comments; fix texture domain; tweak shader; fix color matrix optimization #Patch Set 3 : Revert unnecessary changes #Patch Set 4 : Revert more unnecessary changes #
Total comments: 10
Patch Set 5 : Fix line wrapping #Patch Set 6 : Handle zero intersection crop rect; add test cases to GM; transpose and simplify GM samples #
Total comments: 4
Patch Set 7 : Update to ToT; add comments. #Patch Set 8 : Fixed SkColorFilterImageFilter::asColorFilter(); added unit test. #Patch Set 9 : Revert unrelated changes. #Patch Set 10 : Expose cropping as a parameter on GaussianBlur; plumb it through to GrConvolutionEffect. #Patch Set 11 : Fix comments #
Messages
Total messages: 17 (0 generated)
|