Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 1500923004: Matrix convolution bounds fix; affectsTransparentBlack fixes. (Closed)

Created:
5 years ago by Stephen White
Modified:
5 years ago
Reviewers:
reed2, reed1
CC:
reviews_skia.org, robertphillips, scroggo
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

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:4630 Committed: https://skia.googlesource.com/skia/+/a544eda5ddea215037b1ada6ba5cfc98f6c8ee15

Patch Set 1 #

Patch Set 2 : Make filterPtr a required param for asAColorFilter. #

Total comments: 2

Patch Set 3 : Add a comment to SkRectShaderImageFilter::canComputeFastBounds() #

Patch Set 4 : Win32 fix #

Total comments: 2

Patch Set 5 : Memory leak fix #

Patch Set 6 : Alternate, more future-proof fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -41 lines) Patch
M gm/matrixconvolution.cpp View 1 2 3 1 chunk +12 lines, -11 lines 0 comments Download
M include/core/SkImageFilter.h View 3 chunks +2 lines, -15 lines 0 comments Download
M include/effects/SkColorFilterImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkLightingImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkMatrixConvolutionImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkRectShaderImageFilter.h View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 3 chunks +12 lines, -7 lines 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 chunk +5 lines, -2 lines 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M src/effects/SkRectShaderImageFilter.cpp View 1 2 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 34 (17 generated)
Stephen White
reed@: PTAL. Thanks!
5 years ago (2015-12-04 20:42:20 UTC) #2
reed1
lgtm w/ request for comment https://codereview.chromium.org/1500923004/diff/20001/src/effects/SkRectShaderImageFilter.cpp File src/effects/SkRectShaderImageFilter.cpp (right): https://codereview.chromium.org/1500923004/diff/20001/src/effects/SkRectShaderImageFilter.cpp#newcode82 src/effects/SkRectShaderImageFilter.cpp:82: bool SkRectShaderImageFilter::canComputeFastBounds() const { ...
5 years ago (2015-12-04 21:01:03 UTC) #3
Stephen White
https://codereview.chromium.org/1500923004/diff/20001/src/effects/SkRectShaderImageFilter.cpp File src/effects/SkRectShaderImageFilter.cpp (right): https://codereview.chromium.org/1500923004/diff/20001/src/effects/SkRectShaderImageFilter.cpp#newcode82 src/effects/SkRectShaderImageFilter.cpp:82: bool SkRectShaderImageFilter::canComputeFastBounds() const { On 2015/12/04 21:01:03, reed1 wrote: ...
5 years ago (2015-12-04 21:39:26 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1500923004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1500923004/40001
5 years ago (2015-12-04 21:39:44 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-MSVC-x86-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86-Debug-Trybot/builds/4607)
5 years ago (2015-12-04 21:42:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1500923004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1500923004/60001
5 years ago (2015-12-04 21:44:34 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/8705ec80518ef551994b82ca5ccaeb0241d6adec
5 years ago (2015-12-04 21:57:36 UTC) #14
reed2
Do we need a chrome guard for this change, given the results from the DEPS ...
5 years ago (2015-12-05 02:03:16 UTC) #16
reed2
I think the change in order, where now we call isColorFilterNode before calling affectsTransparentBlack, might ...
5 years ago (2015-12-05 03:28:27 UTC) #17
Stephen White
Whoops; thanks for the investigation. Will revert.
5 years ago (2015-12-05 13:58:35 UTC) #18
Stephen White
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1497083005/ by senorblanco@chromium.org. ...
5 years ago (2015-12-05 13:59:31 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1500923004/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1500923004/80001
5 years ago (2015-12-07 15:02:38 UTC) #22
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-07 15:15:02 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1500923004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1500923004/100001
5 years ago (2015-12-07 15:20:36 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-07 15:35:03 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1500923004/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1500923004/100001
5 years ago (2015-12-07 15:47:56 UTC) #32
commit-bot: I haz the power
5 years ago (2015-12-07 15:48:37 UTC) #34
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://skia.googlesource.com/skia/+/a544eda5ddea215037b1ada6ba5cfc98f6c8ee15

Powered by Google App Engine
This is Rietveld 408576698