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

Unified Diff: cc/trees/layer_tree_host_impl.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
« no previous file with comments | « no previous file | webkit/renderer/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 13198bae4bfde4c1ac33a53ef6234655c954b416..756c5d799e805958b86b177d27ff6775aa20d1dd 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -62,6 +62,7 @@
#include "ui/gfx/frame_time.h"
#include "ui/gfx/size_conversions.h"
#include "ui/gfx/vector2d_conversions.h"
+#include "webkit/renderer/compositor_bindings/webkit_time.h"
jamesr 2014/03/11 20:09:54 this is a bad dependency. the compositor bindings
namespace {
@@ -2650,7 +2651,7 @@ void LayerTreeHostImpl::AnimatePageScale(base::TimeTicks time) {
if (!page_scale_animation_)
return;
- double monotonic_time = (time - base::TimeTicks()).InSecondsF();
+ double monotonic_time = webkit::ToWebKitMonotonicTime(time);
gfx::Vector2dF scroll_total = active_tree_->TotalScrollOffset();
if (!page_scale_animation_->IsAnimationStarted())
@@ -2698,14 +2699,13 @@ void LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time,
TRACE_EVENT0("cc", "LayerTreeHostImpl::AnimateLayers");
last_animation_time_ = wall_clock_time;
- double monotonic_seconds = (monotonic_time - base::TimeTicks()).InSecondsF();
AnimationRegistrar::AnimationControllerMap copy =
animation_registrar_->active_animation_controllers();
for (AnimationRegistrar::AnimationControllerMap::iterator iter = copy.begin();
iter != copy.end();
++iter)
- (*iter).second->Animate(monotonic_seconds);
+ (*iter).second->Animate(webkit::ToWebKitMonotonicTime(monotonic_time));
SetNeedsRedraw();
}
« no previous file with comments | « no previous file | webkit/renderer/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698