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

Unified Diff: third_party/WebKit/Source/core/animation/DocumentAnimations.cpp

Issue 2693363002: Move animation update to follow paint phase for SPv2. (Closed)
Patch Set: Call updateAnimations in SVGImage for SPv2. Created 3 years, 10 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/animation/DocumentAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp b/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
index e7c249939038b681357b67e28aaa43b825104ae6..806b319ef9dfe6410d657e6e6051e18c27d0295e 100644
--- a/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/DocumentAnimations.cpp
@@ -65,11 +65,10 @@ void DocumentAnimations::updateAnimationTimingIfNeeded(Document& document) {
updateAnimationTiming(document, TimingUpdateOnDemand);
}
-void DocumentAnimations::updateAnimations(Document& document) {
- if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- DCHECK(document.lifecycle().state() >= DocumentLifecycle::CompositingClean);
- else
- DCHECK(document.lifecycle().state() >= DocumentLifecycle::LayoutClean);
+void DocumentAnimations::updateAnimations(
+ Document& document,
+ DocumentLifecycle::LifecycleState requiredLifecycleState) {
+ DCHECK(document.lifecycle().state() >= requiredLifecycleState);
wkorman 2017/02/16 23:42:08 Passing the state with which we DCHECK feels weird
wkorman 2017/02/17 19:35:14 After sleeping on this I think it's ok.
if (document.compositorPendingAnimations().update()) {
DCHECK(document.view());

Powered by Google App Engine
This is Rietveld 408576698