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

Issue 555603002: Allow negative values in SkBlurImageFilter sigma. (Closed)

Created:
6 years, 3 months ago by Stephen White
Modified:
6 years, 3 months ago
Reviewers:
sugoi1, sugoi, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Allow negative values in SkBlurImageFilter sigma. There are two ways negative sigma values may occur: in the original filter parameters, or after multiplication by a negative scaling CTM. The former case is invalid according to the spec, so we continue to check for it at validation time. In the latter case, we should interpret it as a horizontal flip in the kernel pixel access, and simply take the absolute value (since the filter kernel is symmetric). Also refactor all this logic into a single place for the CPU, GPU and onFilterBounds() paths. BUG=https://code.google.com/p/chromium/issues/detail?id=409602 Committed: https://skia.googlesource.com/skia/+/32673b99a4fb5d798206eb7665b730ed0b4597a0

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Five is the new three. :) #

Total comments: 4

Patch Set 4 : Restore deserialization check; use SkScalarAbs() #

Patch Set 5 : Fix re: sugoi's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -10 lines) Patch
M src/effects/SkBlurImageFilter.cpp View 1 2 3 4 4 chunks +11 lines, -10 lines 0 comments Download
M tests/ImageFilterTest.cpp View 1 2 2 chunks +65 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
Stephen White
sugoi@: PTAL. Thanks!
6 years, 3 months ago (2014-09-09 15:18:18 UTC) #2
reed1
I think taking abs after the CTM is totally correct. I don't see how that ...
6 years, 3 months ago (2014-09-09 15:37:38 UTC) #4
sugoi1
https://codereview.chromium.org/555603002/diff/40001/src/effects/SkBlurImageFilter.cpp File src/effects/SkBlurImageFilter.cpp (right): https://codereview.chromium.org/555603002/diff/40001/src/effects/SkBlurImageFilter.cpp#newcode30 src/effects/SkBlurImageFilter.cpp:30: sigma.fY = SkMinScalar(sigma.fY, MAX_SIGMA); Shouldn't this happen after line ...
6 years, 3 months ago (2014-09-09 15:42:40 UTC) #6
Stephen White
https://codereview.chromium.org/555603002/diff/40001/src/effects/SkBlurImageFilter.cpp File src/effects/SkBlurImageFilter.cpp (right): https://codereview.chromium.org/555603002/diff/40001/src/effects/SkBlurImageFilter.cpp#newcode31 src/effects/SkBlurImageFilter.cpp:31: if (sigma.fX < 0) { On 2014/09/09 15:37:38, reed1 ...
6 years, 3 months ago (2014-09-09 15:48:15 UTC) #7
Stephen White
On 2014/09/09 15:37:38, reed1 wrote: > I think taking abs after the CTM is totally ...
6 years, 3 months ago (2014-09-09 15:48:45 UTC) #8
Stephen White
New patch up: PTAL. Thanks!
6 years, 3 months ago (2014-09-09 15:54:00 UTC) #9
reed1
lgtm
6 years, 3 months ago (2014-09-09 15:59:54 UTC) #10
Stephen White
https://codereview.chromium.org/555603002/diff/40001/src/effects/SkBlurImageFilter.cpp File src/effects/SkBlurImageFilter.cpp (right): https://codereview.chromium.org/555603002/diff/40001/src/effects/SkBlurImageFilter.cpp#newcode30 src/effects/SkBlurImageFilter.cpp:30: sigma.fY = SkMinScalar(sigma.fY, MAX_SIGMA); On 2014/09/09 15:42:39, sugoi1 wrote: ...
6 years, 3 months ago (2014-09-09 16:03:59 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/senorblanco@chromium.org/555603002/80001
6 years, 3 months ago (2014-09-09 16:08:13 UTC) #13
commit-bot: I haz the power
6 years, 3 months ago (2014-09-09 16:15:12 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as 32673b99a4fb5d798206eb7665b730ed0b4597a0

Powered by Google App Engine
This is Rietveld 408576698