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

Unified Diff: Source/core/page/PageAnimator.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/page/PageAnimator.cpp
diff --git a/Source/core/page/PageAnimator.cpp b/Source/core/page/PageAnimator.cpp
index 93b0e21b80b05b9b7dfee899b61685aae28cf4b0..7449bf907a4cf8cd4185014d81272012a2131c35 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -39,8 +39,13 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
WillBeHeapVector<RefPtrWillBeMember<Document>> documents;
for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- documents.append(toLocalFrame(frame)->document());
+ if (!frame->isLocalFrame())
+ continue;
+ LocalFrame* localFrame = toLocalFrame(frame);
+ // FIXME: Keep the animation timing ticking while throttled.
+ if (localFrame->shouldThrottleRenderingPipeline())
+ continue;
+ documents.append(localFrame->document());
}
for (auto& document : documents) {
@@ -91,7 +96,7 @@ void PageAnimator::updateLayoutAndStyleForPainting(LocalFrame* rootFrame)
// setFrameRect may have the side-effect of causing existing page layout to
// be invalidated, so layout needs to be called last.
- view->updateAllLifecyclePhases();
+ view->updateAllLifecyclePhases(DocumentLifecycle::ThrottlingMode::Allow);
}
}

Powered by Google App Engine
This is Rietveld 408576698