Changeset 237942 in webkit


Ignore:
Timestamp:
Nov 7, 2018 1:46:19 PM (5 years ago)
Author:
Simon Fraser
Message:

Some WK1 repaint tests are flakey
https://bugs.webkit.org/show_bug.cgi?id=190627

Reviewed by Zalan Bujtas.
Source/WebCore:

Repaint tracking in GraphicsLayerCA was sensitive to whether there were already dirty
rects on the layer, since tracking happened after checks against existing dirty rects.
This caused some WK1 repaint tests to be flakey, since there's no guarantee that
no repaints happen between the last layer flush and a test calling startTrackingRepaints().

Fix by moving the repaint tracking to before the checks against existing dirty rects.
This is more similar to how repaint tracking on FrameView works.

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setNeedsDisplayInRect):

LayoutTests:

New baseline.

  • compositing/masks/compositing-clip-path-change-no-repaint-expected.txt:
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r237941 r237942  
     12018-11-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Some WK1 repaint tests are flakey
     4        https://bugs.webkit.org/show_bug.cgi?id=190627
     5
     6        Reviewed by Zalan Bujtas.
     7       
     8        New baseline.
     9
     10        * compositing/masks/compositing-clip-path-change-no-repaint-expected.txt:
     11
    1122018-11-07  Ross Kirsling  <ross.kirsling@sony.com>
    213
  • trunk/LayoutTests/compositing/masks/compositing-clip-path-change-no-repaint-expected.txt

    r204193 r237942  
    3030              (repaint rects
    3131                (rect 0.00 0.00 300.00 300.00)
     32                (rect 0.00 0.00 300.00 300.00)
     33                (rect 0.00 0.00 300.00 300.00)
    3234              )
    3335            )
    3436          (repaint rects
     37            (rect 0.00 0.00 300.00 300.00)
     38            (rect 0.00 0.00 300.00 300.00)
    3539            (rect 0.00 0.00 300.00 300.00)
    3640          )
  • trunk/LayoutTests/platform/ios-wk2/compositing/columns/composited-lr-paginated-repaint-expected.txt

    r225897 r237942  
    1414          (repaint rects
    1515            (rect 27.00 25.00 52.00 77.00)
     16            (rect 27.00 25.00 52.00 77.00)
     17            (rect 27.00 25.00 52.00 77.00)
    1618          )
    1719        )
  • trunk/LayoutTests/platform/ios-wk2/compositing/columns/composited-rl-paginated-repaint-expected.txt

    r225897 r237942  
    1616          (repaint rects
    1717            (rect 27.00 25.00 52.00 77.00)
     18            (rect 27.00 25.00 52.00 77.00)
     19            (rect 27.00 25.00 52.00 77.00)
    1820          )
    1921        )
  • trunk/Source/WebCore/ChangeLog

    r237940 r237942  
     12018-11-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Some WK1 repaint tests are flakey
     4        https://bugs.webkit.org/show_bug.cgi?id=190627
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Repaint tracking in GraphicsLayerCA was sensitive to whether there were already dirty
     9        rects on the layer, since tracking happened after checks against existing dirty rects.
     10        This caused some WK1 repaint tests to be flakey, since there's no guarantee that
     11        no repaints happen between the last layer flush and a test calling startTrackingRepaints().
     12
     13        Fix by moving the repaint tracking to before the checks against existing dirty rects.
     14        This is more similar to how repaint tracking on FrameView works.
     15
     16        * platform/graphics/ca/GraphicsLayerCA.cpp:
     17        (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
     18
    1192018-11-07  Dean Jackson  <dino@apple.com>
    220
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r237266 r237942  
    912912    if (rect.isEmpty())
    913913        return;
    914    
     914
     915    addRepaintRect(rect);
     916
    915917    const size_t maxDirtyRects = 32;
    916    
     918
    917919    for (size_t i = 0; i < m_dirtyRects.size(); ++i) {
    918920        if (m_dirtyRects[i].contains(rect))
    919921            return;
    920922    }
    921    
     923
    922924    if (m_dirtyRects.size() < maxDirtyRects)
    923925        m_dirtyRects.append(rect);
     
    926928
    927929    noteLayerPropertyChanged(DirtyRectsChanged);
    928 
    929     addRepaintRect(rect);
    930930}
    931931
Note: See TracChangeset for help on using the changeset viewer.