Changeset 137215 in webkit


Ignore:
Timestamp:
Dec 10, 2012, 3:43:43 PM (12 years ago)
Author:
Simon Fraser
Message:

Don't unconditionally repaint compositing layers when their size changes
https://bugs.webkit.org/show_bug.cgi?id=104461

Reviewed by Sam Weinig.

Source/WebCore:

RenderLayerBacking always repainted the entire compositing layer when its size
changed. This was done to fix repaint issues when outline widths changes, but
that issue is now solved by repainting in GraphicsLayer::setOffsetFromRenderer(),
add in r134628. I believe this is no longer necessary.

Always repainting when the size changes is terrible for the tile cache when
loading large documents, as all tiles repaint every time the document gets
longer.

Test: compositing/repaint/resize-repaint.html

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

LayoutTests:

Test that dumps repaint rects after adding content to a compositing layer.

  • compositing/repaint/resize-repaint-expected.txt: Added.
  • compositing/repaint/resize-repaint.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137214 r137215  
     12012-12-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't unconditionally repaint compositing layers when their size changes
     4        https://bugs.webkit.org/show_bug.cgi?id=104461
     5
     6        Reviewed by Sam Weinig.
     7
     8        Test that dumps repaint rects after adding content to a compositing layer.
     9
     10        * compositing/repaint/resize-repaint-expected.txt: Added.
     11        * compositing/repaint/resize-repaint.html: Added.
     12
    1132012-12-10  Ojan Vafai  <ojan@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r137214 r137215  
     12012-12-10  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Don't unconditionally repaint compositing layers when their size changes
     4        https://bugs.webkit.org/show_bug.cgi?id=104461
     5
     6        Reviewed by Sam Weinig.
     7
     8        RenderLayerBacking always repainted the entire compositing layer when its size
     9        changed. This was done to fix repaint issues when outline widths changes, but
     10        that issue is now solved by repainting in GraphicsLayer::setOffsetFromRenderer(),
     11        add in r134628. I believe this is no longer necessary.
     12       
     13        Always repainting when the size changes is terrible for the tile cache when
     14        loading large documents, as all tiles repaint every time the document gets
     15        longer.
     16
     17        Test: compositing/repaint/resize-repaint.html
     18
     19        * rendering/RenderLayerBacking.cpp:
     20        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
     21
    1222012-12-10  Ojan Vafai  <ojan@chromium.org>
    223
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r137108 r137215  
    632632    FloatSize oldSize = m_graphicsLayer->size();
    633633    FloatSize newSize = relativeCompositingBounds.size();
    634     if (oldSize != newSize) {
     634    if (oldSize != newSize)
    635635        m_graphicsLayer->setSize(newSize);
    636         // A bounds change will almost always require redisplay. Usually that redisplay
    637         // will happen because of a repaint elsewhere, but not always:
    638         // e.g. see RenderView::setMaximalOutlineSize()
    639         m_graphicsLayer->setNeedsDisplay();
    640     }
    641636
    642637    // If we have a layer that clips children, position it.
Note: See TracChangeset for help on using the changeset viewer.