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

Unified Diff: webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc

Issue 192433002: Creating utility for converting TimeTicks to WebKit double and use it in the Chrome compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworking webkit_time, adding other users. Created 6 years, 9 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: 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 a1de2a26869f9fa71e85bf7a84e890552fd3d2f8..2c4b4e461128a17266ca30d371612457b3eefe40 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
@@ -5,6 +5,7 @@
#include "webkit/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h"
#include "third_party/WebKit/public/platform/WebAnimationDelegate.h"
+#include "webkit/renderer/compositor_bindings/webkit_time.h"
namespace webkit {
@@ -16,7 +17,7 @@ void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(
base::TimeTicks monotonic_time,
cc::Animation::TargetProperty target_property) {
delegate_->notifyAnimationStarted(
- (monotonic_time - base::TimeTicks()).InSecondsF(),
+ ToWebKitMonotonicTime(monotonic_time),
static_cast<blink::WebAnimation::TargetProperty>(target_property));
}
@@ -24,7 +25,7 @@ void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
base::TimeTicks monotonic_time,
cc::Animation::TargetProperty target_property) {
delegate_->notifyAnimationFinished(
- (monotonic_time - base::TimeTicks()).InSecondsF(),
+ ToWebKitMonotonicTime(monotonic_time),
static_cast<blink::WebAnimation::TargetProperty>(target_property));
}

Powered by Google App Engine
This is Rietveld 408576698