diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-16 02:38:51 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-16 02:38:51 +0000 |
commit | 4f67d17c879cc6fac85f5baeb82115e5a5ca169f (patch) | |
tree | 3205b017b12f171eeb6563cdec4539d7570b8bbf /content/renderer/render_widget.cc | |
parent | 14b95f1e35ee10b56b0ec6b88d2f563d5c14e99b (diff) | |
download | chromium_src-4f67d17c879cc6fac85f5baeb82115e5a5ca169f.zip chromium_src-4f67d17c879cc6fac85f5baeb82115e5a5ca169f.tar.gz chromium_src-4f67d17c879cc6fac85f5baeb82115e5a5ca169f.tar.bz2 |
Revert 117824 - Convert use of int ms to TimeDelta in files owned by brettw.
This change broke Linux and Mac bots. I would recommend to ask committers to run your next change on trybots.
(*1) http://chromegw.corp.google.com/i/chromium/builders/Mac/builds/10788/steps/compile/logs/stdio
(*2) http://chromegw.corp.google.com/i/chromium/builders/Linux/builds/19313/steps/compile/logs/stdio
(*3) http://chromegw.corp.google.com/i/chromium/builders/Linux%20x64/builds/21385/steps/compile/logs/stdio
R=brettw@chromium.org
BUG=108171
TEST=
Review URL: http://codereview.chromium.org/9185026
TBR=tedvessenes@gmail.com
Review URL: http://codereview.chromium.org/9215005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_widget.cc')
-rw-r--r-- | content/renderer/render_widget.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 8f610a5..6840d8b 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -677,13 +677,13 @@ void RenderWidget::AnimateIfNeeded() { return; // Target 60FPS if vsync is on. Go as fast as we can if vsync is off. - base::TimeDelta animationInterval = IsRenderingVSynced() ? - base::TimeDelta::FromMilliseconds(16) : base::TimeDelta(); + int animationInterval = IsRenderingVSynced() ? 16 : 0; base::Time now = base::Time::Now(); if (now >= animation_floor_time_ || is_accelerated_compositing_active_) { TRACE_EVENT0("renderer", "RenderWidget::AnimateIfNeeded") - animation_floor_time_ = now + animationInterval; + animation_floor_time_ = now + + base::TimeDelta::FromMilliseconds(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. @@ -706,7 +706,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. - base::TimeDelta delay = animation_floor_time_ - now; + int64 delay = (animation_floor_time_ - now).InMillisecondsRoundedUp(); animation_task_posted_ = true; MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&RenderWidget::AnimationCallback, this), delay); |