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

Issue 337903003: Map light-source oBB-relative coordinates to the user-space of the filter (Closed)

Created:
6 years, 6 months ago by fs
Modified:
6 years, 5 months ago
CC:
blink-reviews, jamesr, krit, jbroman, danakj, ed+blinkwatch_opera.com, Rik, f(malita), gyuyoung.kim_webkit.org, Stephen Chennney, kouhei+svg_chromium.org, pdr., rwlbuis
Project:
blink
Visibility:
Public.

Description

Map light-source oBB-relative coordinates to the user-space of the filter The 'fePointLight' and 'feSpotLight' light-source elements for 'fe{Diffuse,Specular}Lighting' defines positions, and in the case of the latter a 'look-at' point (implicit direction). When an SVG filter is declared to use primitiveUnits=objectBoundingBox, these positions/points needs to be mapped to the user-space of the filter. This is achieved by adding a new method resolve3dPoint() to Filter, and perform the coordinate space mapping when creating the various LightSources. Open-code SVGFELightElement::findLightSource() in it's sources to avoid passing the Filter-instance around more than necessary. BUG=176419 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176499

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -22 lines) Patch
M LayoutTests/TestExpectations View 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/fePointLight-primitiveUnits-objectBoundingBox.html View 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/fePointLight-primitiveUnits-objectBoundingBox-expected.html View 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feSpotLight-primitiveUnits-objectBoundingBox.html View 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feSpotLight-primitiveUnits-objectBoundingBox-expected.html View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/svg/SVGFEDiffuseLightingElement.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/svg/SVGFEDistantLightElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGFEDistantLightElement.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGFELightElement.h View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/svg/SVGFELightElement.cpp View 1 chunk +0 lines, -8 lines 0 comments Download
M Source/core/svg/SVGFEPointLightElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGFEPointLightElement.cpp View 2 chunks +4 lines, -2 lines 0 comments Download
M Source/core/svg/SVGFESpecularLightingElement.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/svg/SVGFESpotLightElement.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGFESpotLightElement.cpp View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/svg/graphics/filters/SVGFilter.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/svg/graphics/filters/SVGFilter.cpp View 1 chunk +9 lines, -0 lines 1 comment Download
M Source/platform/graphics/filters/Filter.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
fs
This is a bit ugly (IMO), but it seemed the least ugly of the non-shaving ...
6 years, 6 months ago (2014-06-18 16:24:31 UTC) #1
Stephen White
https://codereview.chromium.org/337903003/diff/1/Source/core/svg/graphics/filters/SVGFilter.cpp File Source/core/svg/graphics/filters/SVGFilter.cpp (right): https://codereview.chromium.org/337903003/diff/1/Source/core/svg/graphics/filters/SVGFilter.cpp#newcode57 Source/core/svg/graphics/filters/SVGFilter.cpp:57: point.z() * sqrtf(m_targetBoundingBox.size().diagonalLengthSquared() / 2)); Nit: the Z-scaling for ...
6 years, 6 months ago (2014-06-18 17:21:27 UTC) #2
Stephen White
Thanks so much for taking this on! I leave it up to you if you ...
6 years, 6 months ago (2014-06-18 17:21:39 UTC) #3
fs
On 2014/06/18 17:21:27, Stephen White wrote: > https://codereview.chromium.org/337903003/diff/1/Source/core/svg/graphics/filters/SVGFilter.cpp > File Source/core/svg/graphics/filters/SVGFilter.cpp (right): > > https://codereview.chromium.org/337903003/diff/1/Source/core/svg/graphics/filters/SVGFilter.cpp#newcode57 ...
6 years, 6 months ago (2014-06-19 08:06:33 UTC) #4
fs
The CQ bit was checked by fs@opera.com
6 years, 6 months ago (2014-06-19 08:06:56 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/337903003/1
6 years, 6 months ago (2014-06-19 08:07:36 UTC) #6
commit-bot: I haz the power
Change committed as 176499
6 years, 6 months ago (2014-06-19 08:53:31 UTC) #7
Stephen White
On 2014/06/19 08:53:31, I haz the power (commit-bot) wrote: > Change committed as 176499 This ...
6 years, 5 months ago (2014-07-14 21:02:59 UTC) #8
fs
6 years, 5 months ago (2014-07-15 11:02:34 UTC) #9
Message was sent while issue was closed.
On 2014/07/14 21:02:59, Stephen White wrote:
> On 2014/06/19 08:53:31, I haz the power (commit-bot) wrote:
> > Change committed as 176499
> 
> This change seems to have modified the results of this page:
> http://letmespellitoutforyou.com/samples/svg/filter_terrain.svg
> 
> The Point and Spot cases don't seem to animate anymore. This differs from
> Firefox result, where all 9 animate.  The whole page seems to be static on
IE11;
> not sure what's going on there.
> 
> fs@, could you take a look and see if you think we're doing the right thing
> here?

Oopsie daisy... Seems this broke the animation update code-path (not resolving
there...). Filed http://crbug.com/393907, and am running a CL through the
try-bots...

Powered by Google App Engine
This is Rietveld 408576698