Changeset 226317 in webkit
- Timestamp:
- Jan 1, 2018 12:32:33 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r226316 r226317 1 2017-12-30 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r225122): fePointLights don't work 4 https://bugs.webkit.org/show_bug.cgi?id=181142 5 6 Reviewed by Dan Bates. 7 8 Ref test that compares a point light with a flood color. 9 10 * svg/filters/fePointLight-color-expected.svg: Added. 11 * svg/filters/fePointLight-color.svg: Added. 12 1 13 2017-12-31 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r226316 r226317 1 2017-12-30 Simon Fraser <simon.fraser@apple.com> 2 3 REGRESSION (r225122): fePointLights don't work 4 https://bugs.webkit.org/show_bug.cgi?id=181142 5 6 Reviewed by Dan Bates. 7 8 r225122 refactored the initialLightingData code, but failed to set the lighting 9 color in the return value of PointLightSource::computePixelLightingData, so fePointLights 10 always used black. 11 12 Also fix a spelling error in initialLightingData. 13 14 Tests: svg/filters/fePointLight-color.svg 15 16 * platform/graphics/filters/DistantLightSource.cpp: 17 (WebCore::DistantLightSource::initPaintingData): 18 (WebCore::DistantLightSource::computePixelLightingData const): 19 * platform/graphics/filters/FELighting.cpp: 20 (WebCore::FELighting::drawLighting): 21 * platform/graphics/filters/LightSource.h: 22 * platform/graphics/filters/PointLightSource.cpp: 23 (WebCore::PointLightSource::computePixelLightingData const): 24 * platform/graphics/filters/SpotLightSource.cpp: 25 (WebCore::SpotLightSource::computePixelLightingData const): 26 1 27 2017-12-31 Simon Fraser <simon.fraser@apple.com> 2 28 -
trunk/Source/WebCore/platform/graphics/filters/DistantLightSource.cpp
r225122 r226317 40 40 float azimuth = deg2rad(m_azimuth); 41 41 float elevation = deg2rad(m_elevation); 42 paintingData.in tialLightingData.lightVector = {42 paintingData.initialLightingData.lightVector = { 43 43 std::cos(azimuth) * std::cos(elevation), 44 44 std::sin(azimuth) * std::cos(elevation), 45 45 std::sin(elevation) 46 46 }; 47 paintingData.in tialLightingData.lightVectorLength = 1;47 paintingData.initialLightingData.lightVectorLength = 1; 48 48 } 49 49 50 50 LightSource::ComputedLightingData DistantLightSource::computePixelLightingData(const PaintingData& paintingData, int, int, float) const 51 51 { 52 return paintingData.in tialLightingData;52 return paintingData.initialLightingData; 53 53 } 54 54 -
trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp
r226316 r226317 401 401 402 402 Color lightColor = (operatingColorSpace() == ColorSpaceLinearRGB) ? sRGBToLinearColor(m_lightingColor) : m_lightingColor; 403 paintingData.in tialLightingData.colorVector = FloatPoint3D(lightColor.red(), lightColor.green(), lightColor.blue());403 paintingData.initialLightingData.colorVector = FloatPoint3D(lightColor.red(), lightColor.green(), lightColor.blue()); 404 404 m_lightSource->initPaintingData(paintingData); 405 405 -
trunk/Source/WebCore/platform/graphics/filters/LightSource.h
r225122 r226317 48 48 49 49 struct PaintingData { 50 ComputedLightingData in tialLightingData;50 ComputedLightingData initialLightingData; 51 51 FloatPoint3D directionVector; 52 52 float coneCutOffLimit; -
trunk/Source/WebCore/platform/graphics/filters/PointLightSource.cpp
r225122 r226317 40 40 } 41 41 42 LightSource::ComputedLightingData PointLightSource::computePixelLightingData(const PaintingData& , int x, int y, float z) const42 LightSource::ComputedLightingData PointLightSource::computePixelLightingData(const PaintingData& paintingData, int x, int y, float z) const 43 43 { 44 44 FloatPoint3D lightVector = { … … 48 48 }; 49 49 50 return { lightVector, { }, lightVector.length() };50 return { lightVector, paintingData.initialLightingData.colorVector, lightVector.length() }; 51 51 } 52 52 -
trunk/Source/WebCore/platform/graphics/filters/SpotLightSource.cpp
r225122 r226317 105 105 return { 106 106 lightVector, 107 paintingData.in tialLightingData.colorVector * lightStrength,107 paintingData.initialLightingData.colorVector * lightStrength, 108 108 lightVectorLength 109 109 };
Note: See TracChangeset
for help on using the changeset viewer.