diff options
author | senorblanco <senorblanco@chromium.org> | 2015-12-04 13:57:30 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-04 13:57:31 -0800 |
commit | 8705ec80518ef551994b82ca5ccaeb0241d6adec (patch) | |
tree | 205344722622c58258b8bf48cb6e3faf97d18c66 /include/effects/SkLightingImageFilter.h | |
parent | 95f53fbc5ddf14ddb1e51c7ebced2b80fb069f81 (diff) |
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
Diffstat (limited to 'include/effects/SkLightingImageFilter.h')
-rw-r--r-- | include/effects/SkLightingImageFilter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/effects/SkLightingImageFilter.h b/include/effects/SkLightingImageFilter.h index fb356c52e4..33cfceccb2 100644 --- a/include/effects/SkLightingImageFilter.h +++ b/include/effects/SkLightingImageFilter.h @@ -49,7 +49,7 @@ protected: void flatten(SkWriteBuffer&) const override; const SkImageFilterLight* light() const { return fLight.get(); } SkScalar surfaceScale() const { return fSurfaceScale; } - bool affectsTransparentBlack() const override { return true; } + bool canComputeFastBounds() const override { return false; } private: typedef SkImageFilter INHERITED; |