Bug 81790 - [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero
Summary: [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncre...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nat Duca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 09:07 PDT by Nat Duca
Modified: 2012-03-26 13:14 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.68 KB, patch)
2012-03-21 09:08 PDT, Nat Duca
no flags Details | Formatted Diff | Diff
Use other time (1.66 KB, patch)
2012-03-21 09:47 PDT, Nat Duca
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nat Duca 2012-03-21 09:07:51 PDT
[chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero
Comment 1 Nat Duca 2012-03-21 09:08:28 PDT
Created attachment 133054 [details]
Patch
Comment 2 Nat Duca 2012-03-21 09:47:20 PDT
Created attachment 133062 [details]
Use other time
Comment 3 W. James MacLean 2012-03-21 09:57:24 PDT
Why change to currentTime?

When I tried the first patch with monotonic time, slashdot.org work great.

With currentTime I get weird jankiness near the bottom of the page when slashdot.org tries to load more, thus extending the page length.
Comment 4 Nat Duca 2012-03-21 10:10:41 PDT
I'm surprised at this causing jank -- I wonder if its coincidental?

The issue here is that same interface drives the JS requestAnimationFrame which still requires regular timestamps. I experimented with passing both, but because our CCLTH->WVI callback path is certifiably insane, that is hard to make work right.

How about we fix the correctness bug and then come back and do tuning and/or dual timestamps as a followon patch.

Or, we could do this:
https://bugs.webkit.org/show_bug.cgi?id=66683

Which would then allow our updateAnimation flow to use monotonic clock as well.
Comment 5 W. James MacLean 2012-03-21 10:17:47 PDT
(In reply to comment #4)
> I'm surprised at this causing jank -- I wonder if its coincidental?

Not sure, it only seems to occur at that spot on the page when slashdot tries to load more content ... before and after it's fine, but it's goes all weird during the loading.

> The issue here is that same interface drives the JS requestAnimationFrame which still requires regular timestamps. I experimented with passing both, but because our CCLTH->WVI callback path is certifiably insane, that is hard to make work right.
> 
> How about we fix the correctness bug and then come back and do tuning and/or dual timestamps as a followon patch.
> 
> Or, we could do this:
> https://bugs.webkit.org/show_bug.cgi?id=66683
> 
> Which would then allow our updateAnimation flow to use monotonic clock as well.

I'm good with either, as I don't (at the moment) have a clear opinion as to which route is better. We can file a follow-on bug for the jankiness.
Comment 6 James Robinson 2012-03-21 10:28:48 PDT
Comment on attachment 133062 [details]
Use other time

R=me

monotonic is better for animations, but updateAnimations() on WVI currently requires currentTime()
Comment 7 WebKit Review Bot 2012-03-21 11:43:39 PDT
Comment on attachment 133062 [details]
Use other time

Clearing flags on attachment: 133062

Committed r111585: <http://trac.webkit.org/changeset/111585>
Comment 8 WebKit Review Bot 2012-03-21 11:43:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Tony Gentilcore 2012-03-26 08:03:13 PDT
In the chromium android port (at least) requestAnimationFrame was broken so that the timestamp passed to the callback was always zero. This patch fixed it up.

If this wasn't a platform specific breakage, I just wanted to double check that some upstream layout tests were failing as well as a result of the broken callback param. If not, we should add a test that verifies a non-zero RAF callback param along with this fix.
Comment 10 Nat Duca 2012-03-26 11:32:58 PDT
(In reply to comment #9)
> ... is this tested

No it isn't. Layout tests may not be the correct way to test this, however. Unit test incoming.
Comment 11 Tony Gentilcore 2012-03-26 12:13:51 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > ... is this tested
> 
> No it isn't. Layout tests may not be the correct way to test this, however. Unit test incoming.

Nice.

Just thinking about the params to the RAF callback... since that is exposed to the web platform, can't there be at least one layout test for it?
Comment 12 Nat Duca 2012-03-26 12:14:55 PDT
(In reply to comment #11)
> (In reply to comment #10)
Probs could be! I've got a unit test on the way, maybe I"ll get that filed, you can r- it and say "make a layout test too" and then I'll try to get to one of those opportunistically. :)
Comment 13 Nat Duca 2012-03-26 12:34:24 PDT
(In reply to comment #12)
> (In reply to comment #11)
Woah, such a layout test already exists. ~flail hat~
Comment 14 Nat Duca 2012-03-26 13:14:09 PDT
(In reply to comment #13)
> Woah, such a layout test already exists. ~flail hat~

https://bugs.webkit.org/show_bug.cgi?id=82236

The reason this slipped passed layout tests is because the layout tests run without threaded mode flags. I know jamesr has wanted to fix this for a while.