Bug 188839 - [CoordGraphics] Revalidate need for 'coordinated update completion' in ThreadedCompositor
Summary: [CoordGraphics] Revalidate need for 'coordinated update completion' in Thread...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
Keywords: InRadar
Depends on:
Reported: 2018-08-22 04:58 PDT by Zan Dobersek
Modified: 2019-04-04 01:54 PDT (History)
3 users (show)

See Also:

Patch (13.40 KB, patch)
2019-03-13 07:41 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2018-08-22 04:58:45 PDT
In ThreadedCompositor, we enforce what we call a "coordinated update completion with the client" when any platform layer has been updated (WebGL or GStreamer media). This means that the following frame is not "complete" until a main-thread callback is dispatched in which the client (i.e. CompositingCoordinator and the LayerTreeHost that owns it) is notified of the completion of that frame. Any further flushes and updates are blocked until that callback is dispatched.

As far as I remember this solved various rendering glitches in WebGL content that was re-rendered as the previous rendering results were still in the process of being composited. This is not an ideal solution, but it works -- at the expense of the callback scheduling on the main thread, which can be a problem.

Ideally we'd find and use a different solution that allows correct WebGL content presentation without this additional coordination step.

This report originates from bug #188693.
Comment 1 Miguel Gomez 2019-03-13 07:39:36 PDT
I've been testing the rendering on wkgtk and wpe and seeing whether this "coordinated update completion" was required. In a general case, this path is followed only when the WebGL layer is created. After that, during WebGL rendering, there aren't platform layer updates (new buffers come through the proxy) so there's no such coordination really happening.

I've run several WebGL tests, both with wkgtk and wpe and the WebGL rendering is not affected if this change is removed, so I'll send a patch to do so and simplify the code.
Comment 2 Miguel Gomez 2019-03-13 07:41:47 PDT
Created attachment 364532 [details]
Comment 3 WebKit Commit Bot 2019-04-04 01:53:42 PDT
Comment on attachment 364532 [details]

Clearing flags on attachment: 364532

Committed r243865: <https://trac.webkit.org/changeset/243865>
Comment 4 WebKit Commit Bot 2019-04-04 01:53:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2019-04-04 01:54:24 PDT