Title: [237124] trunk/Source/WebCore
- Revision
- 237124
- Author
- simon.fra...@apple.com
- Date
- 2018-10-15 10:25:50 -0700 (Mon, 15 Oct 2018)
Log Message
LayerListMutationDetector should take a reference
https://bugs.webkit.org/show_bug.cgi?id=190586
Reviewed by Zalan Bujtas.
Change LayerListMutationDetector to take a RenderLayer&.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayer.h:
(WebCore::LayerListMutationDetector::LayerListMutationDetector):
(WebCore::LayerListMutationDetector::~LayerListMutationDetector):
* rendering/RenderLayerBacking.cpp:
(WebCore::traverseVisibleNonCompositedDescendantLayers):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
(WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
(WebCore::RenderLayerCompositor::recursiveRepaintLayer):
(WebCore::RenderLayerCompositor::layerHas3DContent const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (237123 => 237124)
--- trunk/Source/WebCore/ChangeLog 2018-10-15 17:25:47 UTC (rev 237123)
+++ trunk/Source/WebCore/ChangeLog 2018-10-15 17:25:50 UTC (rev 237124)
@@ -1,5 +1,32 @@
2018-10-15 Simon Fraser <simon.fra...@apple.com>
+ LayerListMutationDetector should take a reference
+ https://bugs.webkit.org/show_bug.cgi?id=190586
+
+ Reviewed by Zalan Bujtas.
+
+ Change LayerListMutationDetector to take a RenderLayer&.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintList):
+ (WebCore::RenderLayer::hitTestLayer):
+ (WebCore::RenderLayer::calculateClipRects const):
+ * rendering/RenderLayer.h:
+ (WebCore::LayerListMutationDetector::LayerListMutationDetector):
+ (WebCore::LayerListMutationDetector::~LayerListMutationDetector):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::traverseVisibleNonCompositedDescendantLayers):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
+ (WebCore::RenderLayerCompositor::computeCompositingRequirements):
+ (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
+ (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
+ (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
+ (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
+ (WebCore::RenderLayerCompositor::layerHas3DContent const):
+
+2018-10-15 Simon Fraser <simon.fra...@apple.com>
+
Share some code to dirty z-order and normal flow lists when child layers are added or removed
https://bugs.webkit.org/show_bug.cgi?id=190585
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (237123 => 237124)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2018-10-15 17:25:47 UTC (rev 237123)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2018-10-15 17:25:50 UTC (rev 237124)
@@ -4407,7 +4407,7 @@
return;
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(this);
+ LayerListMutationDetector mutationChecker(*this);
#endif
for (auto* childLayer : layerIterator)
@@ -5008,7 +5008,7 @@
// This variable tracks which layer the mouse ends up being inside.
RenderLayer* candidateLayer = nullptr;
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(this);
+ LayerListMutationDetector mutationChecker(*this);
#endif
// Begin by walking our list of positive layers from highest z-index down to the lowest z-index.
@@ -5787,7 +5787,7 @@
ASSERT(isStackingContext() || !positiveZOrderLayers().size());
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(this));
+ LayerListMutationDetector mutationChecker(const_cast<RenderLayer&>(*this));
#endif
auto computeLayersUnion = [this, &unionBounds, flags, descendantFlags] (const RenderLayer& childLayer) {
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (237123 => 237124)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2018-10-15 17:25:47 UTC (rev 237123)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2018-10-15 17:25:50 UTC (rev 237124)
@@ -1195,20 +1195,20 @@
#if !ASSERT_DISABLED
class LayerListMutationDetector {
public:
- LayerListMutationDetector(RenderLayer* layer)
+ LayerListMutationDetector(RenderLayer& layer)
: m_layer(layer)
- , m_previousMutationAllowedState(layer->layerListMutationAllowed())
+ , m_previousMutationAllowedState(layer.layerListMutationAllowed())
{
- m_layer->setLayerListMutationAllowed(false);
+ m_layer.setLayerListMutationAllowed(false);
}
~LayerListMutationDetector()
{
- m_layer->setLayerListMutationAllowed(m_previousMutationAllowedState);
+ m_layer.setLayerListMutationAllowed(m_previousMutationAllowedState);
}
private:
- RenderLayer* m_layer;
+ RenderLayer& m_layer;
bool m_previousMutationAllowedState;
};
#endif
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (237123 => 237124)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2018-10-15 17:25:47 UTC (rev 237123)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2018-10-15 17:25:50 UTC (rev 237124)
@@ -2080,7 +2080,7 @@
parent.updateLayerListsIfNeeded();
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(&parent);
+ LayerListMutationDetector mutationChecker(parent);
#endif
for (auto* childLayer : parent.normalFlowLayers()) {
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (237123 => 237124)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2018-10-15 17:25:47 UTC (rev 237123)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2018-10-15 17:25:50 UTC (rev 237124)
@@ -1265,7 +1265,7 @@
addToOverlapMap(overlapMap, layer, layerExtent);
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(&layer));
+ LayerListMutationDetector mutationChecker(const_cast<RenderLayer&>(layer));
#endif
for (auto* renderLayer : layer.negativeZOrderLayers())
@@ -1363,7 +1363,7 @@
}
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(&layer);
+ LayerListMutationDetector mutationChecker(layer);
#endif
bool anyDescendantHas3DTransform = false;
@@ -1562,7 +1562,7 @@
auto& childList = layerBacking ? layerChildren : childLayersOfEnclosingLayer;
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(&layer);
+ LayerListMutationDetector mutationChecker(layer);
#endif
for (auto* renderLayer : layer.negativeZOrderLayers())
@@ -1810,7 +1810,7 @@
}
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(&layer);
+ LayerListMutationDetector mutationChecker(layer);
#endif
for (auto* renderLayer : layer.negativeZOrderLayers())
@@ -1851,7 +1851,7 @@
return;
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(&layer);
+ LayerListMutationDetector mutationChecker(layer);
#endif
for (auto* renderLayer : layer.negativeZOrderLayers())
@@ -1881,7 +1881,7 @@
layer.setBackingNeedsRepaint();
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(&layer);
+ LayerListMutationDetector mutationChecker(layer);
#endif
if (layer.hasCompositingDescendant()) {
@@ -3498,7 +3498,7 @@
const_cast<RenderLayer&>(layer).updateLayerListsIfNeeded();
#if !ASSERT_DISABLED
- LayerListMutationDetector mutationChecker(const_cast<RenderLayer*>(&layer));
+ LayerListMutationDetector mutationChecker(const_cast<RenderLayer&>(layer));
#endif
for (auto* renderLayer : layer.negativeZOrderLayers()) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes