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

Unified Diff: cc/animation/element_animations.cc

Issue 1734063003: Share animations from compositor to main thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win trybot failure Created 4 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
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/layer_animation_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/element_animations.cc
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index e3c222427d22ed4d81e0753cdc182d09e3f0bab5..6a9dc33dc5da7113ffbf128a74eb521e4eb7f1dd 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -270,6 +270,22 @@ void ElementAnimations::NotifyAnimationAborted(
}
}
+void ElementAnimations::NotifyAnimationTakeover(
+ base::TimeTicks monotonic_time,
+ TargetProperty::Type target_property,
+ double animation_start_time,
+ scoped_ptr<AnimationCurve> curve) {
+ DCHECK(curve);
+ for (PlayersListNode* node = players_list_->head();
+ node != players_list_->end(); node = node->next()) {
+ scoped_ptr<AnimationCurve> animation_curve = curve->Clone();
+ AnimationPlayer* player = node->value();
+ player->NotifyAnimationTakeover(monotonic_time, target_property,
+ animation_start_time,
+ std::move(animation_curve));
+ }
+}
+
gfx::ScrollOffset ElementAnimations::ScrollOffsetForAnimation() const {
DCHECK(layer_animation_controller_);
if (animation_host()) {
« no previous file with comments | « cc/animation/element_animations.h ('k') | cc/animation/layer_animation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698