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

Issue 1518643002: SkBlurImageFilter returns input when sigma = 0 (Closed)

Created:
5 years ago by xidachen
Modified:
5 years ago
CC:
reviews_skia.org
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

SkBlurImageFilter returns input when sigma = 0 In the current implementation, a blur filter is always created even in the case when sigma.fX == 0 && sigma.fY == 0. This CL makes the blur filter return input in this case. BUG=568393 Committed: https://skia.googlesource.com/skia/+/467ddc0b24a63ee1525fa18d1dcf62e47975588a

Patch Set 1 #

Total comments: 5

Patch Set 2 : move the check to SkBlurImageFilter #

Patch Set 3 : clean up code #

Total comments: 2

Patch Set 4 : better coding style #

Patch Set 5 : use 0 instead of 0.0f #

Total comments: 2

Patch Set 6 : braces :) #

Patch Set 7 : fix call sites #

Total comments: 1

Patch Set 8 : safe refcnt #

Total comments: 2

Patch Set 9 : clean up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -10 lines) Patch
M bench/BlurImageFilterBench.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M gm/imageblur.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M gm/imageblur2.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M gm/imageblurtiled.cpp View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M gm/imagefilters.cpp View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -6 lines 0 comments Download
M include/effects/SkBlurImageFilter.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (10 generated)
xidachen
PTAL
5 years ago (2015-12-10 03:00:24 UTC) #2
reed1
Interesting general question about our factories: If we think a given effect (maskfilter, colorfilter, etc.) ...
5 years ago (2015-12-10 13:36:49 UTC) #4
Stephen White
https://codereview.chromium.org/1518643002/diff/1/src/effects/SkDropShadowImageFilter.cpp File src/effects/SkDropShadowImageFilter.cpp (right): https://codereview.chromium.org/1518643002/diff/1/src/effects/SkDropShadowImageFilter.cpp#newcode81 src/effects/SkDropShadowImageFilter.cpp:81: if (sigma.fX != 0 || sigma.fY != 0) On ...
5 years ago (2015-12-10 14:57:18 UTC) #5
Stephen White
On 2015/12/10 13:36:49, reed1 wrote: > Interesting general question about our factories: > > If ...
5 years ago (2015-12-10 14:57:39 UTC) #6
reed1
Good point about fg/bg. We already return null for some "no-ops), e.g. xfermode::create(srcover), so I ...
5 years ago (2015-12-10 15:05:04 UTC) #7
xidachen
I have moved the check to the constructor of SkBlurImageFilter. PTAL. https://codereview.chromium.org/1518643002/diff/1/src/effects/SkDropShadowImageFilter.cpp File src/effects/SkDropShadowImageFilter.cpp (right): ...
5 years ago (2015-12-10 15:16:41 UTC) #8
Stephen White
https://codereview.chromium.org/1518643002/diff/40001/include/effects/SkBlurImageFilter.h File include/effects/SkBlurImageFilter.h (right): https://codereview.chromium.org/1518643002/diff/40001/include/effects/SkBlurImageFilter.h#newcode18 include/effects/SkBlurImageFilter.h:18: if (0.0f == sigmaX && 0.0f == sigmaY && ...
5 years ago (2015-12-10 16:05:40 UTC) #9
xidachen
PS#5 has accommodated for them, thanks for the comments. https://codereview.chromium.org/1518643002/diff/40001/include/effects/SkBlurImageFilter.h File include/effects/SkBlurImageFilter.h (right): https://codereview.chromium.org/1518643002/diff/40001/include/effects/SkBlurImageFilter.h#newcode18 include/effects/SkBlurImageFilter.h:18: ...
5 years ago (2015-12-10 16:17:44 UTC) #10
Stephen White
https://codereview.chromium.org/1518643002/diff/80001/include/effects/SkBlurImageFilter.h File include/effects/SkBlurImageFilter.h (right): https://codereview.chromium.org/1518643002/diff/80001/include/effects/SkBlurImageFilter.h#newcode18 include/effects/SkBlurImageFilter.h:18: if ((0 == sigmaX) && (0 == sigmaY) && ...
5 years ago (2015-12-10 16:20:18 UTC) #11
xidachen
https://codereview.chromium.org/1518643002/diff/80001/include/effects/SkBlurImageFilter.h File include/effects/SkBlurImageFilter.h (right): https://codereview.chromium.org/1518643002/diff/80001/include/effects/SkBlurImageFilter.h#newcode18 include/effects/SkBlurImageFilter.h:18: if ((0 == sigmaX) && (0 == sigmaY) && ...
5 years ago (2015-12-10 16:23:30 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1518643002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1518643002/100001
5 years ago (2015-12-10 16:24:07 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/4680)
5 years ago (2015-12-10 16:25:58 UTC) #16
reed1
the cl comment says we will return null. It should say we will return the ...
5 years ago (2015-12-10 16:31:30 UTC) #17
Stephen White
From the trybots, it looks like there are some benches and GMs which are assuming ...
5 years ago (2015-12-10 16:49:23 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/1518643002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1518643002/120001
5 years ago (2015-12-10 19:12:22 UTC) #21
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years ago (2015-12-10 19:12:23 UTC) #22
Stephen White
https://codereview.chromium.org/1518643002/diff/120001/include/effects/SkBlurImageFilter.h File include/effects/SkBlurImageFilter.h (right): https://codereview.chromium.org/1518643002/diff/120001/include/effects/SkBlurImageFilter.h#newcode19 include/effects/SkBlurImageFilter.h:19: return input; One thing I forgot: since the contract ...
5 years ago (2015-12-10 19:28:40 UTC) #23
reed1
fine with me; a couple of unimportant style nits https://codereview.chromium.org/1518643002/diff/140001/bench/BlurImageFilterBench.cpp File bench/BlurImageFilterBench.cpp (right): https://codereview.chromium.org/1518643002/diff/140001/bench/BlurImageFilterBench.cpp#newcode84 bench/BlurImageFilterBench.cpp:84: ...
5 years ago (2015-12-10 19:41:17 UTC) #25
Stephen White
LGTM (will need Mike's too, since it's a .h change).
5 years ago (2015-12-10 19:45:42 UTC) #26
reed1
lgtm
5 years ago (2015-12-10 19:47:37 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1518643002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1518643002/160001
5 years ago (2015-12-10 19:55:58 UTC) #30
commit-bot: I haz the power
5 years ago (2015-12-10 20:08:47 UTC) #32
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://skia.googlesource.com/skia/+/467ddc0b24a63ee1525fa18d1dcf62e47975588a

Powered by Google App Engine
This is Rietveld 408576698