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

Issue 6409007: Calculate animation_floor_time_ only when actually updating animations (Closed)

Created:
9 years, 10 months ago by jamesr
Modified:
9 years, 6 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, greggman
Visibility:
Public.

Description

Calculate animation_floor_time_ only when actually updating animations This ensures that imperative animations still hit the target framerate if we can render fast enough regardless of when in the animation loop the page calls webkitRequestAnimationFrame(). BUG=71379 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73717

Patch Set 1 #

Patch Set 2 : improved scheduling #

Patch Set 3 : rely only on timer to avoid multiple callbacks per paint #

Total comments: 1

Patch Set 4 : add bool to track if we've called animate() and are waiting for a paint to happen #

Total comments: 5

Patch Set 5 : hopefully clearer #

Patch Set 6 : add a NULL check for webwidget_ (thanks to apatrick) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -14 lines) Patch
M chrome/renderer/render_widget.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/renderer/render_widget.cc View 1 2 3 4 5 6 chunks +39 lines, -14 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
jamesr
Here's a test page to check the behavior of this patch: http://webstuff.nfshost.com/anim-timing/raftime.html I've also dropped ...
9 years, 10 months ago (2011-01-31 09:16:24 UTC) #1
darin (slow to review)
http://codereview.chromium.org/6409007/diff/2002/chrome/renderer/render_widget.cc File chrome/renderer/render_widget.cc (left): http://codereview.chromium.org/6409007/diff/2002/chrome/renderer/render_widget.cc#oldcode524 chrome/renderer/render_widget.cc:524: UpdateAnimationsIfNeeded(); it seems like you should still consider calling ...
9 years, 10 months ago (2011-01-31 19:01:08 UTC) #2
jamesr
Good point. I've added that call back and added another flag to ensure that we ...
9 years, 10 months ago (2011-01-31 21:43:32 UTC) #3
darin (slow to review)
http://codereview.chromium.org/6409007/diff/1002/chrome/renderer/render_widget.cc File chrome/renderer/render_widget.cc (right): http://codereview.chromium.org/6409007/diff/1002/chrome/renderer/render_widget.cc#newcode497 chrome/renderer/render_widget.cc:497: base::TimeDelta::FromMilliseconds(16); // Target 60FPS. nit: 4 space indent instead ...
9 years, 10 months ago (2011-01-31 22:25:57 UTC) #4
jamesr
Hopefully this is slightly clearer. I've started a brief document including a state transition diagram ...
9 years, 10 months ago (2011-02-01 03:12:36 UTC) #5
jamesr
On 2011/01/31 22:25:57, darin wrote: > nit: 2 space indent (and others) oops :) new ...
9 years, 10 months ago (2011-02-01 03:16:45 UTC) #6
darin (slow to review)
9 years, 10 months ago (2011-02-03 20:46:54 UTC) #7
LGTM !

Powered by Google App Engine
This is Rietveld 408576698