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

Unified Diff: cc/animation/animation_player.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/animation_player.h ('k') | cc/animation/animation_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_player.cc
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
index 0c8ad3cb6c97b2f9c04646dfd1fec18e915bba6c..77a7c21ec04dd15db9d8ce39995a51d5b90c5373 100644
--- a/cc/animation/animation_player.cc
+++ b/cc/animation/animation_player.cc
@@ -160,10 +160,11 @@ void AnimationPlayer::AbortAnimation(int animation_id) {
SetNeedsCommit();
}
-void AnimationPlayer::AbortAnimations(TargetProperty::Type target_property) {
+void AnimationPlayer::AbortAnimations(TargetProperty::Type target_property,
+ bool needs_completion) {
if (element_animations_) {
element_animations_->layer_animation_controller()->AbortAnimations(
- target_property);
+ target_property, needs_completion);
SetNeedsCommit();
} else {
auto animations_to_remove = std::remove_if(
@@ -211,6 +212,19 @@ void AnimationPlayer::NotifyAnimationAborted(
target_property, group);
}
+void AnimationPlayer::NotifyAnimationTakeover(
+ base::TimeTicks monotonic_time,
+ TargetProperty::Type target_property,
+ double animation_start_time,
+ scoped_ptr<AnimationCurve> curve) {
+ if (layer_animation_delegate_) {
+ DCHECK(curve);
+ layer_animation_delegate_->NotifyAnimationTakeover(
+ monotonic_time, target_property, animation_start_time,
+ std::move(curve));
+ }
+}
+
void AnimationPlayer::SetNeedsCommit() {
DCHECK(animation_host_);
animation_host_->SetNeedsCommit();
« no previous file with comments | « cc/animation/animation_player.h ('k') | cc/animation/animation_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698