| Index: content/renderer/render_widget.cc
|
| diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
|
| index e60c7939b44cc8786a15458442db9b725ac4a439..dfdae16968cc6f4e9c84137b0f0eee248a4a6128 100644
|
| --- a/content/renderer/render_widget.cc
|
| +++ b/content/renderer/render_widget.cc
|
| @@ -676,13 +676,13 @@ void RenderWidget::AnimateIfNeeded() {
|
| return;
|
|
|
| // Target 60FPS if vsync is on. Go as fast as we can if vsync is off.
|
| - int animationInterval = IsRenderingVSynced() ? 16 : 0;
|
| + base::TimeDelta animationInterval = IsRenderingVSynced() ?
|
| + base::TimeDelta::FromMilliseconds(16) : base::TimeDelta();
|
|
|
| base::Time now = base::Time::Now();
|
| if (now >= animation_floor_time_ || is_accelerated_compositing_active_) {
|
| TRACE_EVENT0("renderer", "RenderWidget::AnimateIfNeeded")
|
| - animation_floor_time_ = now +
|
| - base::TimeDelta::FromMilliseconds(animationInterval);
|
| + animation_floor_time_ = now + animationInterval;
|
| // Set a timer to call us back after animationInterval before
|
| // running animation callbacks so that if a callback requests another
|
| // we'll be sure to run it at the proper time.
|
| @@ -705,7 +705,7 @@ void RenderWidget::AnimateIfNeeded() {
|
| // base::Time::Now() has advanced past the animation_floor_time_. To
|
| // avoid exposing this delay to javascript, we keep posting delayed
|
| // tasks until base::Time::Now() has advanced far enough.
|
| - int64 delay = (animation_floor_time_ - now).InMillisecondsRoundedUp();
|
| + base::TimeDelta delay = animation_floor_time_ - now;
|
| animation_task_posted_ = true;
|
| MessageLoop::current()->PostDelayedTask(
|
| FROM_HERE, base::Bind(&RenderWidget::AnimationCallback, this), delay);
|
|
|