Title: [245326] trunk/Source/WebCore
Revision
245326
Author
[email protected]
Date
2019-05-15 08:59:21 -0700 (Wed, 15 May 2019)

Log Message

Move RenderLayerCompositor's OverlapMap to its own file
https://bugs.webkit.org/show_bug.cgi?id=197915

Reviewed by Alex Christensen.

Move OverlapMap to its own file.
Make use of RectList, which was in the file but unused!
Allocate OverlapMapContainer on the heap both to avoid header pollution of internals,
and because they will get bigger in future.

No behavior change.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/LayerOverlapMap.cpp: Added.
(WebCore::RectList::append):
(WebCore::RectList::intersects const):
(WebCore::OverlapMapContainer::add):
(WebCore::OverlapMapContainer::overlapsLayers const):
(WebCore::OverlapMapContainer::unite):
(WebCore::LayerOverlapMap::LayerOverlapMap):
(WebCore::LayerOverlapMap::add):
(WebCore::LayerOverlapMap::overlapsLayers const):
(WebCore::LayerOverlapMap::pushCompositingContainer):
(WebCore::LayerOverlapMap::popCompositingContainer):
* rendering/LayerOverlapMap.h: Added.
(WebCore::LayerOverlapMap::isEmpty const):
(WebCore::LayerOverlapMap::geometryMap const):
(WebCore::LayerOverlapMap::geometryMap):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
(WebCore::RenderLayerCompositor::computeExtent const):
(WebCore::RenderLayerCompositor::addToOverlapMap):
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::OverlapMapContainer::add): Deleted.
(WebCore::OverlapMapContainer::overlapsLayers const): Deleted.
(WebCore::OverlapMapContainer::unite): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::OverlapMap): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::add): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers const): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::isEmpty const): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::pushCompositingContainer): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::geometryMap const): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::RectList::append): Deleted.
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects const): Deleted.
* rendering/RenderLayerCompositor.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (245325 => 245326)


--- trunk/Source/WebCore/ChangeLog	2019-05-15 15:13:02 UTC (rev 245325)
+++ trunk/Source/WebCore/ChangeLog	2019-05-15 15:59:21 UTC (rev 245326)
@@ -1,3 +1,56 @@
+2019-05-15  Simon Fraser  <[email protected]>
+
+        Move RenderLayerCompositor's OverlapMap to its own file
+        https://bugs.webkit.org/show_bug.cgi?id=197915
+
+        Reviewed by Alex Christensen.
+
+        Move OverlapMap to its own file.
+        Make use of RectList, which was in the file but unused!
+        Allocate OverlapMapContainer on the heap both to avoid header pollution of internals,
+        and because they will get bigger in future.
+
+        No behavior change.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/LayerOverlapMap.cpp: Added.
+        (WebCore::RectList::append):
+        (WebCore::RectList::intersects const):
+        (WebCore::OverlapMapContainer::add):
+        (WebCore::OverlapMapContainer::overlapsLayers const):
+        (WebCore::OverlapMapContainer::unite):
+        (WebCore::LayerOverlapMap::LayerOverlapMap):
+        (WebCore::LayerOverlapMap::add):
+        (WebCore::LayerOverlapMap::overlapsLayers const):
+        (WebCore::LayerOverlapMap::pushCompositingContainer):
+        (WebCore::LayerOverlapMap::popCompositingContainer):
+        * rendering/LayerOverlapMap.h: Added.
+        (WebCore::LayerOverlapMap::isEmpty const):
+        (WebCore::LayerOverlapMap::geometryMap const):
+        (WebCore::LayerOverlapMap::geometryMap):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::updateCompositingLayers):
+        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+        (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
+        (WebCore::RenderLayerCompositor::computeExtent const):
+        (WebCore::RenderLayerCompositor::addToOverlapMap):
+        (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
+        (WebCore::OverlapMapContainer::add): Deleted.
+        (WebCore::OverlapMapContainer::overlapsLayers const): Deleted.
+        (WebCore::OverlapMapContainer::unite): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::OverlapMap): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::add): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers const): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::isEmpty const): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::pushCompositingContainer): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::geometryMap const): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::RectList::append): Deleted.
+        (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects const): Deleted.
+        * rendering/RenderLayerCompositor.h:
+
 2019-05-15  Devin Rousso  <[email protected]>
 
         Web Automation: elements larger than the viewport have incorrect in-view center point

Modified: trunk/Source/WebCore/Sources.txt (245325 => 245326)


--- trunk/Source/WebCore/Sources.txt	2019-05-15 15:13:02 UTC (rev 245325)
+++ trunk/Source/WebCore/Sources.txt	2019-05-15 15:59:21 UTC (rev 245326)
@@ -1971,6 +1971,7 @@
 rendering/InlineFlowBox.cpp
 rendering/InlineIterator.cpp
 rendering/InlineTextBox.cpp
+rendering/LayerOverlapMap.cpp
 rendering/LayoutDisallowedScope.cpp
 rendering/LayoutRepainter.cpp
 rendering/MarkedText.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (245325 => 245326)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-05-15 15:13:02 UTC (rev 245325)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-05-15 15:59:21 UTC (rev 245326)
@@ -5700,6 +5700,8 @@
 		0F60F32A1DFBB10400416D6C /* CommonVM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonVM.h; sourceTree = "<group>"; };
 		0F6383DB18615B29003E5DB5 /* ThreadedScrollingTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadedScrollingTree.cpp; sourceTree = "<group>"; };
 		0F6383DC18615B29003E5DB5 /* ThreadedScrollingTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadedScrollingTree.h; sourceTree = "<group>"; };
+		0F69F2B6228B98FF008D3565 /* LayerOverlapMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LayerOverlapMap.h; sourceTree = "<group>"; };
+		0F69F2B7228B98FF008D3565 /* LayerOverlapMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LayerOverlapMap.cpp; sourceTree = "<group>"; };
 		0F6A12BB1A00923700C6DE72 /* DebugPageOverlays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebugPageOverlays.cpp; sourceTree = "<group>"; };
 		0F6A12BC1A00923700C6DE72 /* DebugPageOverlays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugPageOverlays.h; sourceTree = "<group>"; };
 		0F70495D211B524200369968 /* ActivityState.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ActivityState.cpp; sourceTree = "<group>"; };
@@ -26863,6 +26865,8 @@
 				BCEA481A097D93020094C9E4 /* InlineTextBox.cpp */,
 				BCEA481B097D93020094C9E4 /* InlineTextBox.h */,
 				580371631A66F1D300BAF519 /* LayerFragment.h */,
+				0F69F2B7228B98FF008D3565 /* LayerOverlapMap.cpp */,
+				0F69F2B6228B98FF008D3565 /* LayerOverlapMap.h */,
 				9BD1F6811F046310001C9CDD /* LayoutDisallowedScope.cpp */,
 				9BD1F6801F0462B8001C9CDD /* LayoutDisallowedScope.h */,
 				A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */,

Added: trunk/Source/WebCore/rendering/LayerOverlapMap.cpp (0 => 245326)


--- trunk/Source/WebCore/rendering/LayerOverlapMap.cpp	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LayerOverlapMap.cpp	2019-05-15 15:59:21 UTC (rev 245326)
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "LayerOverlapMap.h"
+
+namespace WebCore {
+
+struct RectList {
+    Vector<LayoutRect> rects;
+    LayoutRect boundingRect;
+    
+    void append(const LayoutRect& rect)
+    {
+        rects.append(rect);
+        boundingRect.unite(rect);
+    }
+
+    void append(const RectList& rectList)
+    {
+        rects.appendVector(rectList.rects);
+        boundingRect.unite(rectList.boundingRect);
+    }
+    
+    bool intersects(const LayoutRect& rect) const
+    {
+        if (!rects.size() || !rect.intersects(boundingRect))
+            return false;
+
+        for (const auto& currentRect : rects) {
+            if (currentRect.intersects(rect))
+                return true;
+        }
+        return false;
+    }
+};
+
+class OverlapMapContainer {
+public:
+    void add(const LayoutRect& bounds)
+    {
+        m_rectList.append(bounds);
+    }
+
+    bool overlapsLayers(const LayoutRect& bounds) const
+    {
+        return m_rectList.intersects(bounds);
+    }
+
+    void unite(const OverlapMapContainer& otherContainer)
+    {
+        m_rectList.append(otherContainer.m_rectList);
+    }
+
+private:
+    RectList m_rectList;
+};
+
+LayerOverlapMap::LayerOverlapMap()
+    : m_geometryMap(UseTransforms)
+{
+    // Begin assuming the root layer will be composited so that there is
+    // something on the stack. The root layer should also never get an
+    // popCompositingContainer call.
+    pushCompositingContainer();
+}
+
+LayerOverlapMap::~LayerOverlapMap() = default;
+
+void LayerOverlapMap::add(const LayoutRect& bounds)
+{
+    // Layers do not contribute to overlap immediately--instead, they will
+    // contribute to overlap as soon as their composited ancestor has been
+    // recursively processed and popped off the stack.
+    ASSERT(m_overlapStack.size() >= 2);
+    m_overlapStack[m_overlapStack.size() - 2]->add(bounds);
+    m_isEmpty = false;
+}
+
+bool LayerOverlapMap::overlapsLayers(const LayoutRect& bounds) const
+{
+    return m_overlapStack.last()->overlapsLayers(bounds);
+}
+
+void LayerOverlapMap::pushCompositingContainer()
+{
+    m_overlapStack.append(std::make_unique<OverlapMapContainer>());
+}
+
+void LayerOverlapMap::popCompositingContainer()
+{
+    m_overlapStack[m_overlapStack.size() - 2]->unite(*m_overlapStack.last());
+    m_overlapStack.removeLast();
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/rendering/LayerOverlapMap.h (0 => 245326)


--- trunk/Source/WebCore/rendering/LayerOverlapMap.h	                        (rev 0)
+++ trunk/Source/WebCore/rendering/LayerOverlapMap.h	2019-05-15 15:59:21 UTC (rev 245326)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "LayoutRect.h"
+#include "RenderGeometryMap.h"
+
+namespace WebCore {
+
+class OverlapMapContainer;
+
+class LayerOverlapMap {
+    WTF_MAKE_NONCOPYABLE(LayerOverlapMap);
+public:
+    LayerOverlapMap();
+    ~LayerOverlapMap();
+
+    void add(const LayoutRect& bounds);
+    bool overlapsLayers(const LayoutRect&) const;
+    bool isEmpty() const { return m_isEmpty; }
+
+    void pushCompositingContainer();
+    void popCompositingContainer();
+
+    const RenderGeometryMap& geometryMap() const { return m_geometryMap; }
+    RenderGeometryMap& geometryMap() { return m_geometryMap; }
+
+private:
+    Vector<std::unique_ptr<OverlapMapContainer>> m_overlapStack;
+    RenderGeometryMap m_geometryMap;
+    bool m_isEmpty { true };
+};
+
+} // namespace WebCore

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (245325 => 245326)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-05-15 15:13:02 UTC (rev 245325)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2019-05-15 15:59:21 UTC (rev 245326)
@@ -42,6 +42,7 @@
 #include "HTMLNames.h"
 #include "HitTestResult.h"
 #include "InspectorInstrumentation.h"
+#include "LayerOverlapMap.h"
 #include "Logging.h"
 #include "NodeList.h"
 #include "Page.h"
@@ -112,119 +113,6 @@
     size_t nextChildIndex { 0 };
 };
 
-class OverlapMapContainer {
-public:
-    void add(const LayoutRect& bounds)
-    {
-        m_layerRects.append(bounds);
-        m_boundingBox.unite(bounds);
-    }
-
-    bool overlapsLayers(const LayoutRect& bounds) const
-    {
-        // Checking with the bounding box will quickly reject cases when
-        // layers are created for lists of items going in one direction and
-        // never overlap with each other.
-        if (!bounds.intersects(m_boundingBox))
-            return false;
-        for (const auto& layerRect : m_layerRects) {
-            if (layerRect.intersects(bounds))
-                return true;
-        }
-        return false;
-    }
-
-    void unite(const OverlapMapContainer& otherContainer)
-    {
-        m_layerRects.appendVector(otherContainer.m_layerRects);
-        m_boundingBox.unite(otherContainer.m_boundingBox);
-    }
-private:
-    Vector<LayoutRect> m_layerRects;
-    LayoutRect m_boundingBox;
-};
-
-class RenderLayerCompositor::OverlapMap {
-    WTF_MAKE_NONCOPYABLE(OverlapMap);
-public:
-    OverlapMap()
-        : m_geometryMap(UseTransforms)
-    {
-        // Begin assuming the root layer will be composited so that there is
-        // something on the stack. The root layer should also never get an
-        // popCompositingContainer call.
-        pushCompositingContainer();
-    }
-
-    void add(const LayoutRect& bounds)
-    {
-        // Layers do not contribute to overlap immediately--instead, they will
-        // contribute to overlap as soon as their composited ancestor has been
-        // recursively processed and popped off the stack.
-        ASSERT(m_overlapStack.size() >= 2);
-        m_overlapStack[m_overlapStack.size() - 2].add(bounds);
-        m_isEmpty = false;
-    }
-
-    bool overlapsLayers(const LayoutRect& bounds) const
-    {
-        return m_overlapStack.last().overlapsLayers(bounds);
-    }
-
-    bool isEmpty() const
-    {
-        return m_isEmpty;
-    }
-
-    void pushCompositingContainer()
-    {
-        m_overlapStack.append(OverlapMapContainer());
-    }
-
-    void popCompositingContainer()
-    {
-        m_overlapStack[m_overlapStack.size() - 2].unite(m_overlapStack.last());
-        m_overlapStack.removeLast();
-    }
-
-    const RenderGeometryMap& geometryMap() const { return m_geometryMap; }
-    RenderGeometryMap& geometryMap() { return m_geometryMap; }
-
-private:
-    struct RectList {
-        Vector<LayoutRect> rects;
-        LayoutRect boundingRect;
-        
-        void append(const LayoutRect& rect)
-        {
-            rects.append(rect);
-            boundingRect.unite(rect);
-        }
-
-        void append(const RectList& rectList)
-        {
-            rects.appendVector(rectList.rects);
-            boundingRect.unite(rectList.boundingRect);
-        }
-        
-        bool intersects(const LayoutRect& rect) const
-        {
-            if (!rects.size() || !boundingRect.intersects(rect))
-                return false;
-
-            for (const auto& currentRect : rects) {
-                if (currentRect.intersects(rect))
-                    return true;
-            }
-            return false;
-        }
-    };
-
-    Vector<OverlapMapContainer> m_overlapStack;
-    RenderGeometryMap m_geometryMap;
-    bool m_isEmpty { true };
-};
-
 struct RenderLayerCompositor::CompositingState {
     CompositingState(RenderLayer* compAncestor, bool testOverlap = true)
         : compositingAncestor(compAncestor)
@@ -867,7 +755,7 @@
     if (updateRoot->hasDescendantNeedingCompositingRequirementsTraversal() || updateRoot->needsCompositingRequirementsTraversal()) {
         CompositingState compositingState(updateRoot);
         BackingSharingState backingSharingState;
-        OverlapMap overlapMap;
+        LayerOverlapMap overlapMap;
 
         bool descendantHas3DTransform = false;
         computeCompositingRequirements(nullptr, rootRenderLayer(), overlapMap, compositingState, backingSharingState, descendantHas3DTransform);
@@ -932,7 +820,7 @@
     return layer.ancestorLayerIsInContainingBlockChain(sharedLayer);
 }
 
-void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, BackingSharingState& backingSharingState, bool& descendantHas3DTransform)
+void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer& layer, LayerOverlapMap& overlapMap, CompositingState& compositingState, BackingSharingState& backingSharingState, bool& descendantHas3DTransform)
 {
     if (!layer.hasDescendantNeedingCompositingRequirementsTraversal()
         && !layer.needsCompositingRequirementsTraversal()
@@ -1182,7 +1070,7 @@
 }
 
 // We have to traverse unchanged layers to fill in the overlap map.
-void RenderLayerCompositor::traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap& overlapMap, CompositingState& compositingState, BackingSharingState& backingSharingState, bool& descendantHas3DTransform)
+void RenderLayerCompositor::traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer& layer, LayerOverlapMap& overlapMap, CompositingState& compositingState, BackingSharingState& backingSharingState, bool& descendantHas3DTransform)
 {
     ASSERT(!compositingState.fullPaintOrderTraversalRequired);
     ASSERT(!layer.hasDescendantNeedingCompositingRequirementsTraversal());
@@ -1888,7 +1776,7 @@
     return nullptr;
 }
 
-void RenderLayerCompositor::computeExtent(const OverlapMap& overlapMap, const RenderLayer& layer, OverlapExtent& extent) const
+void RenderLayerCompositor::computeExtent(const LayerOverlapMap& overlapMap, const RenderLayer& layer, OverlapExtent& extent) const
 {
     if (extent.extentComputed)
         return;
@@ -1919,7 +1807,7 @@
     extent.extentComputed = true;
 }
 
-void RenderLayerCompositor::addToOverlapMap(OverlapMap& overlapMap, const RenderLayer& layer, OverlapExtent& extent)
+void RenderLayerCompositor::addToOverlapMap(LayerOverlapMap& overlapMap, const RenderLayer& layer, OverlapExtent& extent)
 {
     if (layer.isRenderViewLayer())
         return;
@@ -1935,7 +1823,7 @@
     overlapMap.add(clipRect);
 }
 
-void RenderLayerCompositor::addToOverlapMapRecursive(OverlapMap& overlapMap, const RenderLayer& layer, const RenderLayer* ancestorLayer)
+void RenderLayerCompositor::addToOverlapMapRecursive(LayerOverlapMap& overlapMap, const RenderLayer& layer, const RenderLayer* ancestorLayer)
 {
     if (!canBeComposited(layer))
         return;

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (245325 => 245326)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2019-05-15 15:13:02 UTC (rev 245325)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2019-05-15 15:59:21 UTC (rev 245326)
@@ -37,6 +37,7 @@
 class FixedPositionViewportConstraints;
 class GraphicsLayer;
 class GraphicsLayerUpdater;
+class LayerOverlapMap;
 class RenderEmbeddedObject;
 class RenderVideo;
 class RenderWidget;
@@ -368,7 +369,6 @@
 
 private:
     class BackingSharingState;
-    class OverlapMap;
     struct CompositingState;
     struct OverlapExtent;
 
@@ -405,14 +405,14 @@
     // Repaint this and its child layers.
     void recursiveRepaintLayer(RenderLayer&);
 
-    void computeExtent(const OverlapMap&, const RenderLayer&, OverlapExtent&) const;
-    void addToOverlapMap(OverlapMap&, const RenderLayer&, OverlapExtent&);
-    void addToOverlapMapRecursive(OverlapMap&, const RenderLayer&, const RenderLayer* ancestorLayer = nullptr);
+    void computeExtent(const LayerOverlapMap&, const RenderLayer&, OverlapExtent&) const;
+    void addToOverlapMap(LayerOverlapMap&, const RenderLayer&, OverlapExtent&);
+    void addToOverlapMapRecursive(LayerOverlapMap&, const RenderLayer&, const RenderLayer* ancestorLayer = nullptr);
 
     void updateCompositingLayersTimerFired();
 
-    void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, BackingSharingState&, bool& descendantHas3DTransform);
-    void traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer&, OverlapMap&, CompositingState&, BackingSharingState&, bool& descendantHas3DTransform);
+    void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer&, LayerOverlapMap&, CompositingState&, BackingSharingState&, bool& descendantHas3DTransform);
+    void traverseUnchangedSubtree(RenderLayer* ancestorLayer, RenderLayer&, LayerOverlapMap&, CompositingState&, BackingSharingState&, bool& descendantHas3DTransform);
 
     enum class UpdateLevel {
         AllDescendants          = 1 << 0,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to