Chromium Code Reviews| 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(); |
| } |