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

Issue 1403403003: Update feSpotLight to match spec (Closed)

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

Description

Update feSpotLight to match spec This change updates feSpotLight to match the spec via two changes: 1) specularExponent is ignored if the spotlight has no coneAngle (GPU bug only). This change updates the GPU path so that it matches the CPU path and the spec in this regard. 2) specularExponent is clamped to the 1-128 range. The spec does not specify a clamp for the specularExponent attribute of feSpotLight. Note that the spec *does* specify this clamp for the specularExponent attribute of feSpecularLighting. It looks like we incorrectly applied this to both specularExponent attributes. This change (along with a parallel change in Blink) allows us to pass the SVG filter effects conformance test here: http://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObject/filters-light-01-f.html Additionally, this brings our behavior in line with Safari and Edge’s behavior on this filter. Two new cases were added to gm/lighting.cpp to catch these issues: - The existing spotlight case exercised the path where our specular exponent was between 1-128 and had a limiting cone angle. - The first new spotlight case exercises the path where our specular exponent is between 1-128 and we do not have a limiting cone angle. - The second new spotlight case exercises the path where the specular exponent is not within the 1-128 range, to ensure that we don’t incorrectly clip to this range. BUG=472849 Committed: https://skia.googlesource.com/skia/+/c84ccb070258db2803a9e8f532bfe7239a737063

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove unused constant #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -20 lines) Patch
M gm/lighting.cpp View 6 chunks +55 lines, -7 lines 0 comments Download
M src/effects/SkLightingImageFilter.cpp View 1 6 chunks +5 lines, -13 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
ericrk
This one was more interesting :D. PTAL
5 years, 2 months ago (2015-10-15 22:59:12 UTC) #2
Stephen White
Good catches! https://codereview.chromium.org/1403403003/diff/1/src/effects/SkLightingImageFilter.cpp File src/effects/SkLightingImageFilter.cpp (left): https://codereview.chromium.org/1403403003/diff/1/src/effects/SkLightingImageFilter.cpp#oldcode858 src/effects/SkLightingImageFilter.cpp:858: fSpecularExponent(SkScalarPin(specularExponent, kSpecularExponentMin, kSpecularExponentMax)) Although it may not ...
5 years, 2 months ago (2015-10-16 15:03:10 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1403403003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1403403003/1
5 years, 2 months ago (2015-10-16 18:21:16 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1403403003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1403403003/1
5 years, 2 months ago (2015-10-16 18:26:16 UTC) #9
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 2 months ago (2015-10-16 18:26:18 UTC) #10
Stephen White
LGTM
5 years, 2 months ago (2015-10-16 18:35:25 UTC) #12
ericrk
https://codereview.chromium.org/1403403003/diff/1/src/effects/SkLightingImageFilter.cpp File src/effects/SkLightingImageFilter.cpp (left): https://codereview.chromium.org/1403403003/diff/1/src/effects/SkLightingImageFilter.cpp#oldcode858 src/effects/SkLightingImageFilter.cpp:858: fSpecularExponent(SkScalarPin(specularExponent, kSpecularExponentMin, kSpecularExponentMax)) On 2015/10/16 15:03:10, Stephen White wrote: ...
5 years, 2 months ago (2015-10-16 18:36:23 UTC) #14
ericrk
Friendly ping for owners review. Thanks!
5 years, 2 months ago (2015-10-19 21:24:16 UTC) #15
Stephen White
On 2015/10/19 21:24:16, ericrk wrote: > Friendly ping for owners review. Thanks! This should be ...
5 years, 2 months ago (2015-10-19 21:32:17 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1403403003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1403403003/20001
5 years, 2 months ago (2015-10-19 21:32:35 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/c84ccb070258db2803a9e8f532bfe7239a737063
5 years, 2 months ago (2015-10-19 21:44:58 UTC) #19
caryclark
5 years, 2 months ago (2015-10-20 17:03:47 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/1417463006/ by caryclark@google.com.

The reason for reverting is: re-land once layout test have been disabled (so
they can be rebased).

Powered by Google App Engine
This is Rietveld 408576698