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

Unified Diff: cc/animation/layer_animation_controller.cc

Issue 99733003: Add monotonic time and target property to cc::AnimationDelegate notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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_delegate.h ('k') | cc/animation/layer_animation_controller_unittest.cc » ('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 d8c976a884b80544cae736e5f55b3f63ee789eab..43d680b7894ef2b7aa8d33dd8d27dae1a93f71ec 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -282,11 +282,14 @@ void LayerAnimationController::SetAnimationRegistrar(
void LayerAnimationController::NotifyAnimationStarted(
const AnimationEvent& event,
double wall_clock_time) {
+ base::TimeTicks monotonic_time = base::TimeTicks::FromInternalValue(
+ event.monotonic_time * base::Time::kMicrosecondsPerSecond);
if (event.is_impl_only) {
FOR_EACH_OBSERVER(LayerAnimationEventObserver, event_observers_,
OnAnimationStarted(event));
if (layer_animation_delegate_)
- layer_animation_delegate_->NotifyAnimationStarted(wall_clock_time);
+ layer_animation_delegate_->NotifyAnimationStarted(
+ wall_clock_time, monotonic_time, event.target_property);
return;
}
@@ -301,7 +304,8 @@ void LayerAnimationController::NotifyAnimationStarted(
FOR_EACH_OBSERVER(LayerAnimationEventObserver, event_observers_,
OnAnimationStarted(event));
if (layer_animation_delegate_)
- layer_animation_delegate_->NotifyAnimationStarted(wall_clock_time);
+ layer_animation_delegate_->NotifyAnimationStarted(
+ wall_clock_time, monotonic_time, event.target_property);
return;
}
@@ -311,9 +315,12 @@ void LayerAnimationController::NotifyAnimationStarted(
void LayerAnimationController::NotifyAnimationFinished(
const AnimationEvent& event,
double wall_clock_time) {
+ base::TimeTicks monotonic_time = base::TimeTicks::FromInternalValue(
+ event.monotonic_time * base::Time::kMicrosecondsPerSecond);
if (event.is_impl_only) {
if (layer_animation_delegate_)
- layer_animation_delegate_->NotifyAnimationFinished(wall_clock_time);
+ layer_animation_delegate_->NotifyAnimationFinished(
+ wall_clock_time, monotonic_time, event.target_property);
return;
}
@@ -322,7 +329,8 @@ void LayerAnimationController::NotifyAnimationFinished(
active_animations_[i]->target_property() == event.target_property) {
active_animations_[i]->set_received_finished_event(true);
if (layer_animation_delegate_)
- layer_animation_delegate_->NotifyAnimationFinished(wall_clock_time);
+ layer_animation_delegate_->NotifyAnimationFinished(
+ wall_clock_time, monotonic_time, event.target_property);
return;
}
« no previous file with comments | « cc/animation/animation_delegate.h ('k') | cc/animation/layer_animation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698