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

Unified Diff: webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.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 | « webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc
diff --git a/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc b/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc
index 3e25b882fb38a7684332b3ee1194888f2d304648..f5894d3bd1adc00d2dd6d1e49203d414195773fb 100644
--- a/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc
+++ b/webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc
@@ -12,12 +12,32 @@ WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter(
blink::WebAnimationDelegate* delegate)
: delegate_(delegate) {}
-void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(double time) {
- delegate_->notifyAnimationStarted(time);
+void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(
+ double wall_clock_time,
+ base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property) {
+#if WEB_ANIMATION_DELEGATE_TAKES_MONOTONIC_TIME
+ delegate_->notifyAnimationStarted(
+ wall_clock_time,
+ (monotonic_time - base::TimeTicks()).InSecondsF(),
+ static_cast<blink::WebAnimation::TargetProperty>(target_property));
+#else
+ delegate_->notifyAnimationStarted(wall_clock_time);
+#endif
}
-void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(double time) {
- delegate_->notifyAnimationFinished(time);
+void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
+ double wall_clock_time,
+ base::TimeTicks monotonic_time,
+ cc::Animation::TargetProperty target_property) {
+#if WEB_ANIMATION_DELEGATE_TAKES_MONOTONIC_TIME
+ delegate_->notifyAnimationFinished(
+ wall_clock_time,
+ (monotonic_time - base::TimeTicks()).InSecondsF(),
+ static_cast<blink::WebAnimation::TargetProperty>(target_property));
+#else
+ delegate_->notifyAnimationFinished(wall_clock_time);
+#endif
}
} // namespace webkit
« no previous file with comments | « webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698