Avoid triggering compositing updates when only the root layer is composited
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 23:46:18 +0000 (23:46 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2018 23:46:18 +0000 (23:46 +0000)
commit8803a28120863fd9403e86109b0dcdb0d89d2004
treee46eda37655891e57f6c4f27808bfb88a4f9590d
parent9dd1dba690a3ea7baf584628382f74112312587e
Avoid triggering compositing updates when only the root layer is composited
https://bugs.webkit.org/show_bug.cgi?id=191813

Reviewed by Zalan Bujtas.

If we know that the only composited layer is the root, we can avoid triggering deep
compositing updates sometimes, for example when layout changes size or position,
or when z-order lists change.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::addChild):
(WebCore::RenderLayer::removeChild):
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::scrollTo):
(WebCore::RenderLayer::updateCompositingLayersAfterScroll):
(WebCore::outputPaintOrderTreeRecursive):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy): Consult the layer.hasCompositingDescendant()
flag to cut off descendants traversal when possible.
(WebCore::RenderLayerCompositor::layerStyleChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/platform/ios-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp