Save one call to containerForRepaint() when updating layer positions
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Nov 2012 16:58:21 +0000 (16:58 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 11 Nov 2012 16:58:21 +0000 (16:58 +0000)
commit8cb038227cc4167b316beb19d198839594a1d27b
tree35900dc693bf796e1dc9ab0b6df11d7d63ba9cdc
parenta344627e50190a78c883a688ff0d566521c163fb
Save one call to containerForRepaint() when updating layer positions
https://bugs.webkit.org/show_bug.cgi?id=101856

Reviewed by Dan Bernstein.

 RenderLayer::updateLayerPositions() has already computed the repaint container,
 but calls computeRepaintRects() which computes it again. Computing the repaint
 container involves a walk back up the layer tree, so calling it during a tree
 traversal is costly.

 Fix by passing the repaint container down into computeRepaintRects().

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::computeRepaintRects):
(WebCore::RenderLayer::computeRepaintRectsIncludingDescendants):
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
(WebCore::RenderLayer::setHasVisibleContent):
* rendering/RenderLayer.h:
(RenderLayer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@134174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h