Bug 87289 - [BlackBerry] UI thread unnecessarily blocks on WebKit thread when servicing requestAnimationFrames
Summary: [BlackBerry] UI thread unnecessarily blocks on WebKit thread when servicing r...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andrew Lo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-23 11:12 PDT by Andrew Lo
Modified: 2012-05-23 13:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.97 KB, patch)
2012-05-23 12:00 PDT, Andrew Lo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Lo 2012-05-23 11:12:53 PDT
DisplayRefreshMonitor has a mutex to protect m_scheduled and m_previousFrameDone. Those flags are used to signal between the UI thread and WebKit thread. m_scheduled signals when a frame has been requested by WebKit thread. m_previousFrameDone indicates whether the frame change signaled by UI thread has been performed by WebKit thread.

Since both UI thread and WebKit thread lock m_mutex, it is possible for the UI thread to block waiting for the WebKit thread. This is unnecessary: if the UI thread cannot immediately lock the mutex, it can deal with those flags on the next animation tick.
Comment 1 Andrew Lo 2012-05-23 12:00:06 PDT
Created attachment 143609 [details]
Patch
Comment 2 WebKit Review Bot 2012-05-23 13:11:47 PDT
Comment on attachment 143609 [details]
Patch

Clearing flags on attachment: 143609

Committed r118230: <http://trac.webkit.org/changeset/118230>
Comment 3 WebKit Review Bot 2012-05-23 13:11:52 PDT
All reviewed patches have been landed.  Closing bug.