Title: [171073] trunk/Source/WebCore
Revision
171073
Author
[email protected]
Date
2014-07-14 12:15:24 -0700 (Mon, 14 Jul 2014)

Log Message

Move composite bounds calculation to RenderLayerBacking.
https://bugs.webkit.org/show_bug.cgi?id=134864

Reviewed by Darin Adler.

No change in functionality.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
* rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
to the RenderLayer.
(WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
* rendering/RenderLayerCompositor.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171072 => 171073)


--- trunk/Source/WebCore/ChangeLog	2014-07-14 19:14:21 UTC (rev 171072)
+++ trunk/Source/WebCore/ChangeLog	2014-07-14 19:15:24 UTC (rev 171073)
@@ -1,3 +1,19 @@
+2014-07-14  Zalan Bujtas  <[email protected]>
+
+        Move composite bounds calculation to RenderLayerBacking.
+        https://bugs.webkit.org/show_bug.cgi?id=134864
+
+        Reviewed by Darin Adler.
+
+        No change in functionality.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateCompositedBounds):
+        * rendering/RenderLayerCompositor.cpp: it was just proxying the calculateLayerBounds()
+        to the RenderLayer.
+        (WebCore::RenderLayerCompositor::calculateCompositedBounds): Deleted.
+        * rendering/RenderLayerCompositor.h:
+
 2014-07-14  Tim Horton  <[email protected]>
 
         Fix the build.

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (171072 => 171073)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2014-07-14 19:14:21 UTC (rev 171072)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2014-07-14 19:15:24 UTC (rev 171073)
@@ -440,8 +440,7 @@
 
 void RenderLayerBacking::updateCompositedBounds()
 {
-    LayoutRect layerBounds = compositor().calculateCompositedBounds(m_owningLayer, m_owningLayer);
-
+    LayoutRect layerBounds = m_owningLayer.calculateLayerBounds(&m_owningLayer, LayoutSize(), RenderLayer::DefaultCalculateLayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask);
     // Clip to the size of the document or enclosing overflow-scroll layer.
     // If this or an ancestor is transformed, we can't currently compute the correct rect to intersect with.
     // We'd need RenderObject::convertContainerToLocalQuad(), which doesn't yet exist.

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (171072 => 171073)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2014-07-14 19:14:21 UTC (rev 171072)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2014-07-14 19:15:24 UTC (rev 171073)
@@ -968,15 +968,6 @@
         m_renderView.frameView().setNeedsOneShotDrawingSynchronization();
 }
 
-// The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant
-// RenderLayers that are rendered by the composited RenderLayer.
-LayoutRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer& layer, const RenderLayer& ancestorLayer) const
-{
-    if (!canBeComposited(layer))
-        return LayoutRect();
-    return layer.calculateLayerBounds(&ancestorLayer, layer.offsetFromAncestor(&ancestorLayer), RenderLayer::DefaultCalculateLayerBoundsFlags | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask);
-}
-
 void RenderLayerCompositor::layerWasAdded(RenderLayer&, RenderLayer&)
 {
     setCompositingLayersNeedRebuild();

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (171072 => 171073)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2014-07-14 19:14:21 UTC (rev 171072)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h	2014-07-14 19:15:24 UTC (rev 171073)
@@ -160,10 +160,6 @@
     bool needsFixedRootBackgroundLayer(const RenderLayer&) const;
     GraphicsLayer* fixedRootBackgroundLayer() const;
     
-    // Return the bounding box required for compositing layer and its childern, relative to ancestorLayer.
-    // If layerBoundingBox is not 0, on return it contains the bounding box of this layer only.
-    LayoutRect calculateCompositedBounds(const RenderLayer&, const RenderLayer& ancestorLayer) const;
-
     // Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
     void repaintOnCompositingChange(RenderLayer&);
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to