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

Issue 1848953002: Image filters: optimize crop rect application (Closed)

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

Description

Image filters: optimize crop rect application. If a filter does not affect transparent black, there's no reason to allow the crop rect to expand beyond the optimal size determined by onFilterNodeBounds(). So don't enlarge the bounds unless the filter affects transparent black. In order to determine which filters affect transparent black, I've pulled the inverse of the canComputeFastBounds() logic into a non-recursive, affectsTransparentBlack() virtual, and left canComputeFastBounds() as a non-virtual, recursive function that calls it. BUG=599933 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1848953002 TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/6db0a7bdceb6be85721bfb0db8dea7fd27db5970

Patch Set 1 #

Patch Set 2 : SkPaintImageFilter also affects transparent black #

Patch Set 3 : Make canComputeFastBounds non-virtual #

Patch Set 4 : Change applyTo() signature back. #

Patch Set 5 : Fix typo #

Patch Set 6 : Update to ToT #

Total comments: 8

Patch Set 7 : Fixes per review remarks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -30 lines) Patch
M include/core/SkImageFilter.h View 1 2 3 4 5 6 3 chunks +8 lines, -3 lines 0 comments Download
M include/effects/SkColorFilterImageFilter.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkLightingImageFilter.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkMatrixConvolutionImageFilter.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M include/effects/SkPaintImageFilter.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkImageFilter.cpp View 1 2 3 4 5 6 chunks +26 lines, -10 lines 0 comments Download
M src/effects/SkColorFilterImageFilter.cpp View 1 2 3 4 5 1 chunk +2 lines, -5 lines 0 comments Download
M src/effects/SkMatrixConvolutionImageFilter.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M src/effects/SkMergeImageFilter.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M src/effects/SkPaintImageFilter.cpp View 1 2 3 4 5 1 chunk +2 lines, -5 lines 0 comments Download

Messages

Total messages: 26 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1848953002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1848953002/80001
4 years, 8 months ago (2016-03-31 21:22:48 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-01 11:50:39 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1848953002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1848953002/100001
4 years, 8 months ago (2016-04-01 19:02:07 UTC) #10
Stephen White
Rob: PTAL. Thanks!
4 years, 8 months ago (2016-04-01 19:05:02 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-01 19:23:58 UTC) #14
robertphillips
lgtm + dox suggestions & a nit https://codereview.chromium.org/1848953002/diff/100001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/1848953002/diff/100001/include/core/SkImageFilter.h#newcode93 include/core/SkImageFilter.h:93: * edges ...
4 years, 8 months ago (2016-04-01 19:58:08 UTC) #15
Stephen White
https://codereview.chromium.org/1848953002/diff/100001/include/core/SkImageFilter.h File include/core/SkImageFilter.h (right): https://codereview.chromium.org/1848953002/diff/100001/include/core/SkImageFilter.h#newcode93 include/core/SkImageFilter.h:93: * edges which reduce the size of the bounds ...
4 years, 8 months ago (2016-04-01 21:26:35 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1848953002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1848953002/120001
4 years, 8 months ago (2016-04-01 21:28:27 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/8319)
4 years, 8 months ago (2016-04-01 21:29:57 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1848953002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1848953002/120001
4 years, 8 months ago (2016-04-01 23:40:17 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-01 23:41:17 UTC) #26
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://skia.googlesource.com/skia/+/6db0a7bdceb6be85721bfb0db8dea7fd27db5970

Powered by Google App Engine
This is Rietveld 408576698