Changeset 154018 in webkit


Ignore:
Timestamp:
Aug 13, 2013, 1:18:30 PM (13 years ago)
Author:
Simon Fraser
Message:

Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
https://bugs.webkit.org/show_bug.cgi?id=119551

Reviewed by Dean Jackson.

Only re-parent the flattening layer if we had to update our
layer configuration (reparenting is necessary then to get
the correct sibling ordering), or if it was parented in some
other layer.

This avoid unnecessary flushing of state to CA.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154013 r154018  
     12013-08-13  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
     4        https://bugs.webkit.org/show_bug.cgi?id=119551
     5
     6        Reviewed by Dean Jackson.
     7
     8        Only re-parent the flattening layer if we had to update our
     9        layer configuration (reparenting is necessary then to get
     10        the correct sibling ordering), or if it was parented in some
     11        other layer.
     12       
     13        This avoid unnecessary flushing of state to CA.
     14
     15        * rendering/RenderLayerBacking.cpp:
     16        (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
     17
    1182013-08-13  Robert Hogan  <robert@webkit.org>
    219
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r154009 r154018  
    540540
    541541    if (GraphicsLayer* flatteningLayer = tileCacheFlatteningLayer()) {
    542         flatteningLayer->removeFromParent();
    543         m_graphicsLayer->addChild(flatteningLayer);
     542        if (layerConfigChanged || flatteningLayer->parent() != m_graphicsLayer)
     543            m_graphicsLayer->addChild(flatteningLayer);
    544544    }
    545545
Note: See TracChangeset for help on using the changeset viewer.