Clean up RenderLayerCompositor::computeCompositingRequirements() and traverseUnchange...
[WebKit-https.git] / Source / WebCore / ChangeLog
index c35bf04..d7010f2 100644 (file)
 
 2019-05-15  Simon Fraser  <simon.fraser@apple.com>
 
+        Clean up RenderLayerCompositor::computeCompositingRequirements() and traverseUnchangedSubtree()
+        https://bugs.webkit.org/show_bug.cgi?id=197931
+
+        Reviewed by Zalan Bujtas.
+
+        These functions have grown and become hard to maintain, so try to undo some technical debt.
+
+        Rename "childState" to "currentState" since it's the state we pass to children, but also
+        is state we change when the current layer becomes composited.
+
+        Separate the layerWillComposite() lambda from layerWillCompositePostDescendants().
+
+        Group the chunks of code at end of the functions into:
+            - updating bits on RenderLayer
+            - updating compositingState with changes from children and our state
+            - doing post-traversal work on overlapMap and backingSharingState
+
+        Code shared between the two functions is pushed into CompositingState::updateWithDescendantStateAndLayer().
+
+        This moves code around but should not cause any behavior change.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateConfiguration):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty const):
+        (WebCore::RenderLayerCompositor::CompositingState::updateWithDescendantStateAndLayer):
+        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
+        (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
+        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildren): Deleted.
+        (WebCore::RenderLayerCompositor::CompositingState::propagateStateFromChildrenForUnchangedSubtree): Deleted.
+        (WebCore::RenderLayerCompositor::clipsCompositingDescendants const): Deleted.
+        * rendering/RenderLayerCompositor.h:
+
+2019-05-15  Simon Fraser  <simon.fraser@apple.com>
+
         Make LayerOverlapMap able to output to a TextStream
         https://bugs.webkit.org/show_bug.cgi?id=197923