Matrix convolution bounds fix; affectsTransparentBlack fixes.
authorsenorblanco <senorblanco@chromium.org>
Fri, 4 Dec 2015 21:57:30 +0000 (13:57 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 4 Dec 2015 21:57:31 +0000 (13:57 -0800)
commit8705ec80518ef551994b82ca5ccaeb0241d6adec
tree205344722622c58258b8bf48cb6e3faf97d18c66
parent95f53fbc5ddf14ddb1e51c7ebced2b80fb069f81
Matrix convolution bounds fix; affectsTransparentBlack fixes.

Because the convolution kernel is (currently) applied in device space,
there's no way to know which object-space pixels will be touched. So
return false from canComputeFastBounds().

The results from the matrixconvolution GM were actually wrong, since
they were showing edge differences on the clip boundaries, where they
should really only show on crop boundaries. I added a crop to the GM
to keep the results the same (which are useful to test the different
convolution tile modes).

While I was at it, SkImageFilter::affectsTransparentBlack() was
inapplicable on most things except color filters, and its use on
leaf nodes was confusing. So I removed it, and made
SkImageFilter::canComputeFastBounds() virtual instead.

BUG=skia:

Review URL: https://codereview.chromium.org/1500923004
gm/matrixconvolution.cpp
include/core/SkImageFilter.h
include/effects/SkColorFilterImageFilter.h
include/effects/SkLightingImageFilter.h
include/effects/SkMatrixConvolutionImageFilter.h
include/effects/SkRectShaderImageFilter.h
src/core/SkImageFilter.cpp
src/effects/SkColorFilterImageFilter.cpp
src/effects/SkMatrixConvolutionImageFilter.cpp
src/effects/SkRectShaderImageFilter.cpp