Bug 83179 - [chromium] Race condition in CCLayerTreeHostTestSynchronizeAnimationStartTimes
Summary: [chromium] Race condition in CCLayerTreeHostTestSynchronizeAnimationStartTimes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: vollick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 10:23 PDT by vollick
Modified: 2012-04-05 11:58 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.81 KB, patch)
2012-04-04 10:29 PDT, vollick
no flags Details | Formatted Diff | Diff
Patch (3.52 KB, patch)
2012-04-04 12:18 PDT, vollick
no flags Details | Formatted Diff | Diff
Patch (3.75 KB, patch)
2012-04-04 12:20 PDT, vollick
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description vollick 2012-04-04 10:23:52 PDT
This test checks if animateLayers has been called before notifyAnimationStarted, but with the threaded compositior, this may not be true.
Comment 1 vollick 2012-04-04 10:29:29 PDT
Created attachment 135621 [details]
Patch

Removes the race condition in CCLayerTreeHostTestSynchronizeAnimationStartTimes.

Also re-enables CCLayerTreeHostTestAddAnimationWithTimingFunction which I think may have been mistakenly disabled rather than CCLayerTreeHostTestSynchronizeAnimationStartTimes.
Comment 2 vollick 2012-04-04 12:18:57 PDT
Created attachment 135648 [details]
Patch

Before the call to notifyAnimationStarted, we must have a valid layerTreeHostImpl
or else we won't be able to compare the start times of the animations. Previously,
we'd grabbed this value in TestHooks::animateLayers. This function is called on
the impl thread _after_ the call to CCLayerTreeHostImpl::animateLayers. The problem
is that we check this value in notifyAnimationStarted which executes on the main
thread, possibly before TestHooks::animateLayers. To get around this problem, we
grab the pointer to the layerTreeHostImpl in willAnimateLayers instead. This is
guaranteed to be called before notifyAnimationStarted (notifyAnimationStarted is
called due to a task posted by CCLayerTreeHostImpl::animateLayers, which is
called after willAnimateLayers).
Comment 3 vollick 2012-04-04 12:20:44 PDT
Created attachment 135651 [details]
Patch

Re-enables CCLayerTreeHostTestAddAnimationWithTimingFunction.
Comment 4 WebKit Review Bot 2012-04-05 11:58:12 PDT
Comment on attachment 135651 [details]
Patch

Clearing flags on attachment: 135651

Committed r113346: <http://trac.webkit.org/changeset/113346>
Comment 5 WebKit Review Bot 2012-04-05 11:58:19 PDT
All reviewed patches have been landed.  Closing bug.