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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d077458a
2013-08-13 Simon Fraser <simon.fraser@apple.com>
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):
2013-08-13 Robert Hogan <robert@webkit.org>
Section's collapsed borders painted in wrong place in rtl tables
......@@ -539,8 +539,8 @@ bool RenderLayerBacking::updateGraphicsLayerConfiguration()
updateInternalHierarchy();
if (GraphicsLayer* flatteningLayer = tileCacheFlatteningLayer()) {
flatteningLayer->removeFromParent();
m_graphicsLayer->addChild(flatteningLayer);
if (layerConfigChanged || flatteningLayer->parent() != m_graphicsLayer)
m_graphicsLayer->addChild(flatteningLayer);
}
if (updateMaskLayer(renderer->hasMask()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment