Title: [152213] trunk/Source/WebCore
Revision
152213
Author
[email protected]
Date
2013-06-29 13:22:19 -0700 (Sat, 29 Jun 2013)

Log Message

Avoid calling isSimpleContainerCompositingLayer() an extra time
https://bugs.webkit.org/show_bug.cgi?id=118218

Reviewed by Tim Horton.

containsPaintedContent() called isSimpleContainerCompositingLayer(), which
is not particularly cheap. But the caller already has this information,
so pass it in.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerBacking.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152212 => 152213)


--- trunk/Source/WebCore/ChangeLog	2013-06-29 20:19:43 UTC (rev 152212)
+++ trunk/Source/WebCore/ChangeLog	2013-06-29 20:22:19 UTC (rev 152213)
@@ -1,5 +1,21 @@
 2013-06-29  Simon Fraser  <[email protected]>
 
+        Avoid calling isSimpleContainerCompositingLayer() an extra time
+        https://bugs.webkit.org/show_bug.cgi?id=118218
+
+        Reviewed by Tim Horton.
+
+        containsPaintedContent() called isSimpleContainerCompositingLayer(), which
+        is not particularly cheap. But the caller already has this information,
+        so pass it in.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateDrawsContent):
+        (WebCore::RenderLayerBacking::containsPaintedContent):
+        * rendering/RenderLayerBacking.h:
+
+2013-06-29  Simon Fraser  <[email protected]>
+
         Avoid doing work in RenderBox::outlineBoundsForRepaint() when the repaintContainer is this
         https://bugs.webkit.org/show_bug.cgi?id=118215
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (152212 => 152213)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2013-06-29 20:19:43 UTC (rev 152212)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2013-06-29 20:22:19 UTC (rev 152213)
@@ -979,7 +979,7 @@
         return;
     }
 
-    bool hasPaintedContent = !isSimpleContainer && containsPaintedContent();
+    bool hasPaintedContent = containsPaintedContent(isSimpleContainer);
 
     // FIXME: we could refine this to only allocate backing for one of these layers if possible.
     m_graphicsLayer->setDrawsContent(hasPaintedContent);
@@ -1652,9 +1652,9 @@
     return hasVisibleNonCompositingDescendant(m_owningLayer);
 }
 
-bool RenderLayerBacking::containsPaintedContent() const
+bool RenderLayerBacking::containsPaintedContent(bool isSimpleContainer) const
 {
-    if (isSimpleContainerCompositingLayer() || paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
+    if (isSimpleContainer || paintsIntoWindow() || paintsIntoCompositedAncestor() || m_artificiallyInflatedBounds || m_owningLayer->isReflection())
         return false;
 
     if (isDirectlyCompositedImage())

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (152212 => 152213)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.h	2013-06-29 20:19:43 UTC (rev 152212)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h	2013-06-29 20:22:19 UTC (rev 152213)
@@ -254,7 +254,7 @@
     // Returns true if this compositing layer has no visible content.
     bool isSimpleContainerCompositingLayer() const;
     // Returns true if this layer has content that needs to be rendered by painting into the backing store.
-    bool containsPaintedContent() const;
+    bool containsPaintedContent(bool isSimpleContainer) const;
     // Returns true if the RenderLayer just contains an image that we can composite directly.
     bool isDirectlyCompositedImage() const;
     void updateImageContents();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to