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

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: Make NotifyAnimationTakeover pure virtual 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
Index: cc/animation/element_animations.cc
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index e3c222427d22ed4d81e0753cdc182d09e3f0bab5..eebe862ef6a3cb4c232b565a315250d4ae9270d4 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -270,6 +270,20 @@ void ElementAnimations::NotifyAnimationAborted(
}
}
+void ElementAnimations::NotifyAnimationTakeover(
+ base::TimeTicks monotonic_time,
+ 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, animation_start_time,
+ std::move(animation_curve));
+ }
+}
+
gfx::ScrollOffset ElementAnimations::ScrollOffsetForAnimation() const {
DCHECK(layer_animation_controller_);
if (animation_host()) {

Powered by Google App Engine
This is Rietveld 408576698