Changeset 246309 in webkit


Ignore:
Timestamp:
Jun 11, 2019 5:50:50 AM (5 years ago)
Author:
Fujii Hironori
Message:

[cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
https://bugs.webkit.org/show_bug.cgi?id=198701

Source/WebCore:

PlatformContextCairo::pushImageMask blits wrong position of the
surface to the background of masking objects. And, I don't know
the reason why this blitting is needed. Removed the blitting.

Reviewed by Carlos Garcia Campos.

Tests: svg/clip-path/clip-opacity.html

svg/clip-path/svg-in-html.html

  • platform/graphics/cairo/PlatformContextCairo.cpp:

(WebCore::PlatformContextCairo::pushImageMask): Don't blit the
surface to the background.

LayoutTests:

Reviewed by Carlos Garcia Campos.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:

Unskipped svg/gradients/spreadMethodDiagonal3.svg and svg/gradients/spreadMethodDiagonal4.svg.

  • svg/clip-path/clip-opacity-expected.html: Added.
  • svg/clip-path/clip-opacity.html: Added.
  • svg/clip-path/svg-in-html-expected.html: Added.
  • svg/clip-path/svg-in-html.html: Added.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246287 r246309  
     12019-06-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
     4        https://bugs.webkit.org/show_bug.cgi?id=198701
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * platform/gtk/TestExpectations:
     9        * platform/wpe/TestExpectations:
     10        Unskipped svg/gradients/spreadMethodDiagonal3.svg and svg/gradients/spreadMethodDiagonal4.svg.
     11
     12        * svg/clip-path/clip-opacity-expected.html: Added.
     13        * svg/clip-path/clip-opacity.html: Added.
     14        * svg/clip-path/svg-in-html-expected.html: Added.
     15        * svg/clip-path/svg-in-html.html: Added.
     16
    1172019-06-10  Daniel Bates  <dabates@apple.com>
    218
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r246285 r246309  
    36233623
    36243624webkit.org/b/189739 svg/gradients/spreadMethodClose2.svg [ ImageOnlyFailure ]
    3625 webkit.org/b/189739 svg/gradients/spreadMethodDiagonal3.svg [ ImageOnlyFailure ]
    3626 webkit.org/b/189739 svg/gradients/spreadMethodDiagonal4.svg [ ImageOnlyFailure ]
    36273625
    36283626webkit.org/b/189994 fast/files/xhr-response-blob.html [ Failure ]
  • trunk/LayoutTests/platform/wpe/TestExpectations

    r245565 r246309  
    13071307webkit.org/b/112228 svg/custom/resources-css-scaled.html [ ImageOnlyFailure ]
    13081308webkit.org/b/189739 svg/gradients/spreadMethodClose2.svg [ ImageOnlyFailure ]
    1309 webkit.org/b/189739 svg/gradients/spreadMethodDiagonal3.svg [ ImageOnlyFailure ]
    1310 webkit.org/b/189739 svg/gradients/spreadMethodDiagonal4.svg [ ImageOnlyFailure ]
    13111309webkit.org/b/115440 svg/stroke/animated-non-scaling-stroke.html [ ImageOnlyFailure Pass ]
    13121310webkit.org/b/88230 svg/stroke/non-scaling-stroke-pattern.svg [ ImageOnlyFailure Pass ]
  • trunk/Source/WebCore/ChangeLog

    r246302 r246309  
     12019-06-11  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [cairo][SVG] Putting multiple path elements in clippath causes rendering artifacts
     4        https://bugs.webkit.org/show_bug.cgi?id=198701
     5
     6        PlatformContextCairo::pushImageMask blits wrong position of the
     7        surface to the background of masking objects. And, I don't know
     8        the reason why this blitting is needed. Removed the blitting.
     9
     10        Reviewed by Carlos Garcia Campos.
     11
     12        Tests: svg/clip-path/clip-opacity.html
     13               svg/clip-path/svg-in-html.html
     14
     15        * platform/graphics/cairo/PlatformContextCairo.cpp:
     16        (WebCore::PlatformContextCairo::pushImageMask): Don't blit the
     17        surface to the background.
     18
    1192019-06-10  Fujii Hironori  <Hironori.Fujii@sony.com>
    220
  • trunk/Source/WebCore/platform/graphics/cairo/PlatformContextCairo.cpp

    r227292 r246309  
    111111    // and then paint it to the surface with an image mask (which is an immediate
    112112    // operation) during restorePlatformState.
    113 
    114     // We want to allow the clipped elements to composite with the surface as it
    115     // is now, but they are isolated in another group. To make this work, we're
    116     // going to blit the current surface contents onto the new group once we push it.
    117     cairo_surface_t* currentTarget = cairo_get_target(m_cr.get());
    118     cairo_surface_flush(currentTarget);
    119 
    120     // Pushing a new group ensures that only things painted after this point are clipped.
    121113    cairo_push_group(m_cr.get());
    122     cairo_set_operator(m_cr.get(), CAIRO_OPERATOR_SOURCE);
    123 
    124     // To avoid the limit of Pixman backend, we need to reduce the size of pattern matrix
    125     // See https://bugs.webkit.org/show_bug.cgi?id=154283
    126     cairo_set_source_surface(m_cr.get(), currentTarget, rect.x(), rect.y());
    127     cairo_translate(m_cr.get(), rect.x(), rect.y());
    128     cairo_rectangle(m_cr.get(), 0, 0, rect.width(), rect.height());
    129     cairo_fill(m_cr.get());
    130     cairo_translate(m_cr.get(), -rect.x(), -rect.y());
    131114}
    132115
Note: See TracChangeset for help on using the changeset viewer.