Changeset 226316 in webkit


Ignore:
Timestamp:
Jan 1, 2018, 12:28:32 PM (7 years ago)
Author:
Simon Fraser
Message:

Bottom right pixel of feDiffuseLighting has the wrong color
https://bugs.webkit.org/show_bug.cgi?id=181203

Reviewed by Antti Koivisto.

Source/WebCore:

The lower right pixel of a feDiffuseLighting was the wrong color, because the kernel
values didn't match the spec for the bottom right Y values.

Test: svg/filters/feDiffuseLighting-bottomRightPixel.html

  • platform/graphics/filters/FELighting.cpp:

(WebCore::FELighting::LightingData::bottomRightNormal const):

LayoutTests:

Test that draws an SVG image into a canvas, and scales it up without interpolation.

  • svg/filters/feDiffuseLighting-bottomRightPixel-expected.html: Added.
  • svg/filters/feDiffuseLighting-bottomRightPixel.html: Added.
  • svg/filters/resources/feDiffuseLighting-rect.svg: Added.
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r226315 r226316  
     12017-12-31  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Bottom right pixel of feDiffuseLighting has the wrong color
     4        https://bugs.webkit.org/show_bug.cgi?id=181203
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Test that draws an SVG image into a canvas, and scales it up without interpolation.
     9
     10        * svg/filters/feDiffuseLighting-bottomRightPixel-expected.html: Added.
     11        * svg/filters/feDiffuseLighting-bottomRightPixel.html: Added.
     12        * svg/filters/resources/feDiffuseLighting-rect.svg: Added.
     13
    1142017-12-30  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/LayoutTests/svg/filters/feSpotLight-color-expected.svg

    r226315 r226316  
    66</defs>
    77<rect x="0" y="00" width="400" height="400" filter="url(#filter)"/>
    8 <!-- Mask out a small difference in the bottom right corner -->
    9 <rect x="385" y="385" width="20" height="20" fill="black"/>
    108</svg>
  • trunk/LayoutTests/svg/filters/feSpotLight-color.svg

    r226315 r226316  
    88</defs>
    99<rect x="0" y="0" width="400" height="400" filter="url(#filter)"/>
    10 <!-- Mask out a small difference in the bottom right corner -->
    11 <rect x="385" y="385" width="20" height="20" fill="black"/>
    1210</svg>
  • trunk/Source/WebCore/ChangeLog

    r226315 r226316  
     12017-12-31  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Bottom right pixel of feDiffuseLighting has the wrong color
     4        https://bugs.webkit.org/show_bug.cgi?id=181203
     5
     6        Reviewed by Antti Koivisto.
     7
     8        The lower right pixel of a feDiffuseLighting was the wrong color, because the kernel
     9        values didn't match the spec for the bottom right Y values.
     10
     11        Test: svg/filters/feDiffuseLighting-bottomRightPixel.html
     12
     13        * platform/graphics/filters/FELighting.cpp:
     14        (WebCore::FELighting::LightingData::bottomRightNormal const):
     15
    1162017-12-30  Simon Fraser  <simon.fraser@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp

    r226315 r226316  
    234234    return {
    235235        -topLeft + top - 2 * left + 2 * center,
    236         topLeft - 2 * top + left + 2 * center
     236        -topLeft - 2 * top + left + 2 * center
    237237    };
    238238}
Note: See TracChangeset for help on using the changeset viewer.