Clean up code related to compositing overlap map maintenance
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 May 2019 04:07:37 +0000 (04:07 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 May 2019 04:07:37 +0000 (04:07 +0000)
commit6e0817f32bfbc6eff0b8db77e25d2146a2801f42
treed4a21e02485de04298724c64d9f3fe6a5f321836
parent03ea79ed90c3dc526eeb9f9597a8b0519f8ab148
Clean up code related to compositing overlap map maintenance
https://bugs.webkit.org/show_bug.cgi?id=197936

Reviewed by Zalan Bujtas.

Clarify the logic around updating the overlap map:

When a layer becomes composited, or paints into a non-root composited layer, we add it to the overlap map
after traversing descendants (since it only affets layers later in traversal).

If a layer became composited after traversing descendants, we need to go back and add all the descendants
to the overlap map with a recursive traversal.

We can do all this near the end of computeCompositingRequirements/traverseUnchangedSubtree because
we only check overlap when we enter this function on later layers.

Add a CompositingOverlap log channel and use it to log the state of the overlap map.

* platform/Logging.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
(WebCore::RenderLayerCompositor::addToOverlapMap const):
(WebCore::RenderLayerCompositor::addDescendantsToOverlapMapRecursive const):
(WebCore::RenderLayerCompositor::updateOverlapMap const):
(WebCore::RenderLayerCompositor::addToOverlapMap): Deleted.
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive): Deleted.
* rendering/RenderLayerCompositor.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/Logging.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h