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

Unified Diff: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp

Issue 1246173002: Throttle rendering pipeline for invisible iframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ojan's comments. Created 5 years, 3 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
Index: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
diff --git a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
index 53657cedd899cc8ab4f52e093fa34c4a0a19b8e6..b6f92a670e003593b126717de09f8d4ea6f3a2e0 100644
--- a/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
+++ b/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
@@ -194,6 +194,10 @@ void updateDescendantDependentFlagsForEntireSubtree(DeprecatedPaintLayer& layer)
void DeprecatedPaintLayerCompositor::updateIfNeededRecursive()
{
+ FrameView* view = m_layoutView.frameView();
+ if (view->shouldThrottleStyleLayoutAndCompositingUpdates())
+ return;
+
for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
if (!child->isLocalFrame())
continue;
@@ -238,8 +242,12 @@ void DeprecatedPaintLayerCompositor::updateIfNeededRecursive()
ASSERT(lifecycle().state() == DocumentLifecycle::CompositingClean);
assertNoUnresolvedDirtyBits();
for (Frame* child = m_layoutView.frameView()->frame().tree().firstChild(); child; child = child->tree().nextSibling()) {
- if (child->isLocalFrame())
- toLocalFrame(child)->contentLayoutObject()->compositor()->assertNoUnresolvedDirtyBits();
+ if (!child->isLocalFrame())
+ continue;
+ LocalFrame* localFrame = toLocalFrame(child);
+ if (localFrame->shouldThrottleStyleLayoutAndCompositingUpdates())
+ continue;
+ localFrame->contentLayoutObject()->compositor()->assertNoUnresolvedDirtyBits();
}
#endif
}

Powered by Google App Engine
This is Rietveld 408576698