Bug 130990 - Double-buffer RemoteLayerBackingStore
Summary: Double-buffer RemoteLayerBackingStore
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
Depends on:
Reported: 2014-03-31 15:19 PDT by Tim Horton
Modified: 2014-03-31 16:01 PDT (History)
2 users (show)

See Also:

patch (10.57 KB, patch)
2014-03-31 15:20 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-03-31 15:19:56 PDT
We'll keep a front and back buffer for each surface; the front is generally currently
being displayed in the UI process, and the back is the one we'll paint into.

Swap the two surfaces each time we paint; since we synchronize with the UI process,
the old front surface will generally be out-of-use by the render server by the time
we paint again. However, since render server commits are asynchronous and we have 
no way to syncronize with them yet, we have to check if the (swapped to front) back buffer is in use,
and create a new front buffer if it is.

Triple-buffering would solve this problem, as would synchronization with the render server,
as would a pool of surfaces - we will revisit these solutions in future patches.
Comment 1 Tim Horton 2014-03-31 15:20:44 PDT
Created attachment 228209 [details]
Comment 2 Tim Horton 2014-03-31 16:01:09 PDT