Changeset 163019 in webkit


Ignore:
Timestamp:
Jan 29, 2014 8:11:47 AM (10 years ago)
Author:
Antti Koivisto
Message:

REGRESSION (r162947): css3/flexbox/multiline-justify-content.html and css3/flexbox/position-absolute-child.html are timing out
https://bugs.webkit.org/show_bug.cgi?id=127809

Reviewed by Anders Carlsson.

Source/WebCore:

These tests generate very large number of small repaint rectangles that overwhelm the region code.

  • page/FrameView.cpp:

(WebCore::FrameView::repaintContentRectangle):

  • platform/graphics/Region.h:

(WebCore::Region::gridSize):
(WebCore::Region::Shape::gridSize):

Add accessor for getting the current region grid complexity.

  • rendering/RenderView.cpp:

(WebCore::RenderView::repaintViewRectangle):

If the region gets very complex merge the repaint rects into a single big rectangle.

LayoutTests:

  • platform/mac/TestExpectations:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r163018 r163019  
     12014-01-29  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r162947): css3/flexbox/multiline-justify-content.html and css3/flexbox/position-absolute-child.html are timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=127809
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * platform/mac/TestExpectations:
     9
    1102014-01-29  Radu Stavila  <stavila@adobe.com>
    211
  • trunk/LayoutTests/platform/mac/TestExpectations

    r162974 r163019  
    13241324
    13251325webkit.org/b/127310 svg/filters/feComponentTransfer-style-crash.xhtml [ Pass Failure Timeout ]
    1326 
    1327 webkit.org/b/127809 css3/flexbox/multiline-justify-content.html [ Skip ]
    1328 webkit.org/b/127809 css3/flexbox/position-absolute-child.html [ Skip ]
  • trunk/Source/WebCore/ChangeLog

    r163018 r163019  
     12014-01-29  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r162947): css3/flexbox/multiline-justify-content.html and css3/flexbox/position-absolute-child.html are timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=127809
     5
     6        Reviewed by Anders Carlsson.
     7
     8        These tests generate very large number of small repaint rectangles that overwhelm the region code.
     9
     10        * page/FrameView.cpp:
     11        (WebCore::FrameView::repaintContentRectangle):
     12        * platform/graphics/Region.h:
     13        (WebCore::Region::gridSize):
     14        (WebCore::Region::Shape::gridSize):
     15       
     16            Add accessor for getting the current region grid complexity.
     17
     18        * rendering/RenderView.cpp:
     19        (WebCore::RenderView::repaintViewRectangle):
     20       
     21            If the region gets very complex merge the repaint rects into a single big rectangle.
     22
    1232014-01-29  Radu Stavila  <stavila@adobe.com>
    224
  • trunk/Source/WebCore/platform/graphics/Region.h

    r116538 r163019  
    5959    unsigned totalArea() const;
    6060
     61    unsigned gridSize() const { return m_shape.gridSize(); }
     62
    6163#ifndef NDEBUG
    6264    void dump() const;
     
    8284        bool isEmpty() const { return m_spans.isEmpty(); }
    8385        bool isRect() const { return m_spans.size() <= 2 && m_segments.size() <= 2; }
     86        unsigned gridSize() const { return m_spans.size() * m_segments.size(); }
    8487
    8588        typedef const Span* SpanIterator;
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r162962 r163019  
    635635    }
    636636    m_accumulatedRepaintRegion->unite(pixelSnappedRect);
     637
     638    // Region will get slow if it gets too complex. Merge all rects so far to bounds if this happens.
     639    // FIXME: Maybe there should be a region type that does this automatically.
     640    static const unsigned maximumRepaintRegionGridSize = 16 * 16;
     641    if (m_accumulatedRepaintRegion->gridSize() > maximumRepaintRegionGridSize)
     642        m_accumulatedRepaintRegion = std::make_unique<Region>(m_accumulatedRepaintRegion->bounds());
    637643}
    638644
Note: See TracChangeset for help on using the changeset viewer.