Changeset 231485 in webkit


Ignore:
Timestamp:
May 8, 2018 9:20:06 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

feTurbulence is not rendered correctly on Retina display
https://bugs.webkit.org/show_bug.cgi?id=183798

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-05-08
Reviewed by Simon Fraser.

Source/WebCore:

On 2x display the feTurbulence filter creates a scaled ImageBuffer but
processes only the unscaled size. This is a remaining work of r168577 and
is very similar to what was done for the feMorphology filter in r188271.

Test: fast/hidpi/filters-turbulence.html

  • platform/graphics/filters/FETurbulence.cpp:

(WebCore::FETurbulence::fillRegion const):
(WebCore::FETurbulence::platformApplySoftware):

LayoutTests:

  • fast/hidpi/filters-turbulence-expected.html: Added.
  • fast/hidpi/filters-turbulence.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r231475 r231485  
     12018-05-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        feTurbulence is not rendered correctly on Retina display
     4        https://bugs.webkit.org/show_bug.cgi?id=183798
     5
     6        Reviewed by Simon Fraser.
     7
     8        * fast/hidpi/filters-turbulence-expected.html: Added.
     9        * fast/hidpi/filters-turbulence.html: Added.
     10
    1112018-05-07  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r231480 r231485  
     12018-05-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        feTurbulence is not rendered correctly on Retina display
     4        https://bugs.webkit.org/show_bug.cgi?id=183798
     5
     6        Reviewed by Simon Fraser.
     7
     8        On 2x display the feTurbulence filter creates a scaled ImageBuffer but
     9        processes only the unscaled size. This is a remaining work of r168577 and
     10        is very similar to what was done for the feMorphology filter in r188271.
     11
     12        Test: fast/hidpi/filters-turbulence.html
     13
     14        * platform/graphics/filters/FETurbulence.cpp:
     15        (WebCore::FETurbulence::fillRegion const):
     16        (WebCore::FETurbulence::platformApplySoftware):
     17
    1182018-05-07  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp

    r228218 r231485  
    371371
    372372    IntRect filterRegion = absolutePaintRect();
     373    filterRegion.scale(filter().filterScale());
    373374    FloatPoint point(0, filterRegion.y() + startY);
    374375    int indexOfPixelChannel = startY * (filterRegion.width() << 2);
     
    399400        return;
    400401
    401     if (absolutePaintRect().isEmpty()) {
     402    IntSize resultSize(absolutePaintRect().size());
     403    resultSize.scale(filter().filterScale());
     404
     405    if (resultSize.isEmpty()) {
    402406        pixelArray->zeroFill();
    403407        return;
     
    413417    initPaint(paintingData);
    414418
    415     auto area = absolutePaintRect().area();
     419    auto area = resultSize.area();
    416420    if (area.hasOverflowed())
    417421        return;
    418422
    419     int height = absolutePaintRect().height();
     423    int height = resultSize.height();
    420424
    421425    unsigned maxNumThreads = height / 8;
Note: See TracChangeset for help on using the changeset viewer.