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

Unified Diff: third_party/WebKit/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: Rebased to post merge awesomeness. 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: third_party/WebKit/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
index 7f50b0f64c6a861ba8f197f6b2e85458a96d4793..ceb603cce62252f8ff3d4dc22317b940d83016ab 100644
--- a/third_party/WebKit/Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp
+++ b/third_party/WebKit/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
}
@@ -608,7 +616,7 @@ bool DeprecatedPaintLayerCompositor::scrollingLayerDidChange(DeprecatedPaintLaye
String DeprecatedPaintLayerCompositor::layerTreeAsText(LayerTreeFlags flags)
{
- ASSERT(lifecycle().state() >= DocumentLifecycle::PaintInvalidationClean);
+ ASSERT(lifecycle().state() >= DocumentLifecycle::PaintInvalidationClean || (m_layoutView.frameView() && m_layoutView.frameView()->shouldThrottleRenderingPipeline()));
if (!m_rootContentLayer)
return String();
@@ -872,12 +880,15 @@ void DeprecatedPaintLayerCompositor::resetTrackedPaintInvalidationRects()
void DeprecatedPaintLayerCompositor::setTracksPaintInvalidations(bool tracksPaintInvalidations)
{
#if ENABLE(ASSERT)
+ FrameView* view = m_layoutView.frameView();
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
ASSERT(lifecycle().state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean
// TODO(wangxianzhu): Remove this when we remove the old path for spv2.
- || lifecycle().state() == DocumentLifecycle::PaintInvalidationClean);
+ || lifecycle().state() == DocumentLifecycle::PaintInvalidationClean
+ || (view && view->shouldThrottleRenderingPipeline()));
} else {
- ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean);
+ ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean
+ || (view && view->shouldThrottleRenderingPipeline()));
}
#endif
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698