Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1781)

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 206283003: Avoid tree walks when computing RenderLayer::scrollParent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build errors. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index 32563e506ffc7042cd66ec0c7de38d3caf1fb4bb..f62b204885829561013f04195cf29e35b2e02f3a 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -388,6 +388,14 @@ void RenderLayerCompositor::setNeedsCompositingUpdate(CompositingUpdateType upda
m_renderView.frameView()->scheduleAnimation();
}
+static void clearAncestorDependentPropertyCacheRecursive(RenderLayer* layer)
+{
+ layer->clearAncestorDependentPropertyCache();
+ RenderLayerStackingNodeIterator iterator(*layer->stackingNode(), AllChildren);
+ for (RenderLayer* child = layer->firstChild(); child; child = child->nextSibling())
+ clearAncestorDependentPropertyCacheRecursive(child);
+}
+
void RenderLayerCompositor::updateCompositingLayers()
{
TRACE_EVENT0("blink_rendering", "RenderLayerCompositor::updateCompositingLayers");
@@ -405,6 +413,9 @@ void RenderLayerCompositor::updateCompositingLayers()
updateCompositingLayersInternal();
+ // Clear data only valid during compositing updates.
+ clearAncestorDependentPropertyCacheRecursive(rootRenderLayer());
+
lifecycle().advanceTo(DocumentLifecycle::CompositingClean);
DocumentAnimations::startPendingAnimations(m_renderView.document());
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698