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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1364063007: Throttle rendering pipeline for invisible frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IntersectionObserverification Created 5 years, 2 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/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index dd976b77bff4aa2411b104588939d6ac91b35734..7c72cf2d951c52171a2a57ca167e9bcf1aa3fa47 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -3249,7 +3249,8 @@ void LayoutObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas
if (!isUpgradingDelayedFullToFull) {
ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidation);
- frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting().
+ if (!frameView() || !frameView()->shouldThrottleRenderingPipeline())
+ frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting().
markContainerChainForPaintInvalidation();
}
}
@@ -3260,7 +3261,8 @@ void LayoutObject::setMayNeedPaintInvalidation()
return;
m_bitfields.setMayNeedPaintInvalidation(true);
markContainerChainForPaintInvalidation();
- frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting().
+ if (!frameView() || !frameView()->shouldThrottleRenderingPipeline())
+ frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting().
}
void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& paintInvalidationState)

Powered by Google App Engine
This is Rietveld 408576698