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

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: Keep animation time consistent. 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..aeb6e75de98abad467b95d9c366d3eab882adbe2 100644
--- a/Source/core/page/PageAnimator.cpp
+++ b/Source/core/page/PageAnimator.cpp
@@ -44,7 +44,10 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
}
for (auto& document : documents) {
+ DocumentAnimations::updateAnimationTimingForAnimationFrame(*document, monotonicAnimationStartTime);
if (document->view()) {
+ if (document->view()->shouldThrottleRenderingPipeline())
+ continue;
document->view()->scrollableArea()->serviceScrollAnimations(monotonicAnimationStartTime);
if (const FrameView::ScrollableAreaSet* animatingScrollableAreas = document->view()->animatingScrollableAreas()) {
@@ -56,7 +59,6 @@ void PageAnimator::serviceScriptedAnimations(double monotonicAnimationStartTime)
scrollableArea->serviceScrollAnimations(monotonicAnimationStartTime);
}
}
- DocumentAnimations::updateAnimationTimingForAnimationFrame(*document, monotonicAnimationStartTime);
SVGDocumentExtensions::serviceOnAnimationFrame(*document, monotonicAnimationStartTime);
document->serviceScriptedAnimations(monotonicAnimationStartTime);
}
@@ -91,7 +93,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