Title: [94741] trunk/Source/WebCore
Revision
94741
Author
[email protected]
Date
2011-09-07 18:38:22 -0700 (Wed, 07 Sep 2011)

Log Message

offsetFromRoot optimization is disabled after r93837
https://bugs.webkit.org/show_bug.cgi?id=67677

Reviewed by Simon Fraser.

Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2)
because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't
have a good test harness to cover such slowdown.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss
the optimization altogether.

(WebCore::RenderLayer::computeRepaintRects):
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
* rendering/RenderLayer.h:
Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94740 => 94741)


--- trunk/Source/WebCore/ChangeLog	2011-09-08 01:31:26 UTC (rev 94740)
+++ trunk/Source/WebCore/ChangeLog	2011-09-08 01:38:22 UTC (rev 94741)
@@ -1,3 +1,23 @@
+2011-09-07  Julien Chaffraix  <[email protected]>
+
+        offsetFromRoot optimization is disabled after r93837
+        https://bugs.webkit.org/show_bug.cgi?id=67677
+
+        Reviewed by Simon Fraser.
+
+        Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2)
+        because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't
+        have a good test harness to cover such slowdown.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss
+        the optimization altogether.
+
+        (WebCore::RenderLayer::computeRepaintRects):
+        (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
+        * rendering/RenderLayer.h:
+        Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming.
+
 2011-09-07  Ryosuke Niwa  <[email protected]>
 
         Windows build fix after r94737.

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (94740 => 94741)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2011-09-08 01:31:26 UTC (rev 94740)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2011-09-08 01:38:22 UTC (rev 94741)
@@ -341,7 +341,7 @@
         RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
         IntRect oldRepaintRect = m_repaintRect;
         IntRect oldOutlineBox = m_outlineBox;
-        computeRepaintRects();
+        computeRepaintRects(offsetFromRoot);
         // FIXME: Should ASSERT that value calculated for m_outlineBox using the cached offset is the same
         // as the value not using the cached offset, but we can't due to https://bugs.webkit.org/show_bug.cgi?id=37048
         if (flags & CheckForRepaint) {
@@ -397,14 +397,14 @@
     return repaintRect;
 }
 
-void RenderLayer::computeRepaintRects(IntPoint* cachedOffset)
+void RenderLayer::computeRepaintRects(IntPoint* offsetFromRoot)
 {
     ASSERT(m_hasVisibleContent);
     ASSERT(!m_visibleContentStatusDirty);
 
     RenderBoxModelObject* repaintContainer = renderer()->containerForRepaint();
     m_repaintRect = renderer()->clippedOverflowRectForRepaint(repaintContainer);
-    m_outlineBox = renderer()->outlineBoundsForRepaint(repaintContainer, cachedOffset);
+    m_outlineBox = renderer()->outlineBoundsForRepaint(repaintContainer, offsetFromRoot);
 }
 
 void RenderLayer::clearRepaintRects()
@@ -429,7 +429,7 @@
     updateLayerPosition();
 
     if (fixed || renderer()->style()->position() == FixedPosition) {
-        // FIXME: Is it worth passing the cachedOffset around like in updateLayerPositions?
+        // FIXME: Is it worth passing the offsetFromRoot around like in updateLayerPositions?
         computeRepaintRects();
         fixed = true;
     } else if (renderer()->hasTransform() && !renderer()->isRenderView()) {

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (94740 => 94741)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2011-09-08 01:31:26 UTC (rev 94740)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2011-09-08 01:38:22 UTC (rev 94741)
@@ -467,7 +467,7 @@
     void setContainsDirtyOverlayScrollbars(bool dirtyScrollbars) { m_containsDirtyOverlayScrollbars = dirtyScrollbars; }
 
 private:
-    void computeRepaintRects(IntPoint* cachedOffset = 0);
+    void computeRepaintRects(IntPoint* offsetFromRoot = 0);
     void clearRepaintRects();
 
     // The normal operator new is disallowed on all render objects.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to