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

Unified Diff: cc/animation/layer_animation_controller.cc

Issue 579863004: CC: Add fill mode to compositor animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 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
« no previous file with comments | « cc/animation/animation_unittest.cc ('k') | cc/blink/web_animation_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/layer_animation_controller.cc
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index fbd02f38be914b2bdbd652e1e823aa00d7a04888..08a0ee91f1854cf4fc5020b50d8996803a9f1c01 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -144,6 +144,9 @@ void LayerAnimationController::AccumulatePropertyUpdates(
if (!animation->is_impl_only())
continue;
+ if (!animation->InEffect(monotonic_time))
+ continue;
+
double trimmed = animation->TrimTimeToCurrentIteration(monotonic_time);
switch (animation->target_property()) {
case Animation::Opacity: {
@@ -835,6 +838,9 @@ void LayerAnimationController::TickAnimations(base::TimeTicks monotonic_time) {
if (animations_[i]->run_state() == Animation::Starting ||
animations_[i]->run_state() == Animation::Running ||
animations_[i]->run_state() == Animation::Paused) {
+ if (!animations_[i]->InEffect(monotonic_time))
+ continue;
+
double trimmed =
animations_[i]->TrimTimeToCurrentIteration(monotonic_time);
« no previous file with comments | « cc/animation/animation_unittest.cc ('k') | cc/blink/web_animation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698