Commit 90056240 authored by Jocelyn Turcotte's avatar Jocelyn Turcotte
Browse files

<chromium> Convert sync points to GL fence syncs.


Chromium is always producing and consuming the textures on the GPU
thread, switching the GL context accordingly, and are using sync
points to externally know when it is correct to send the consumming
GL commands down the pipe of their respective GL context.

Since Qt is consuming those textures in a different thread,
synchronizing when commands are handed down to GL isn't always enough.
The GL driver could decide to do additional scheduling and end up
executing Qt's consuming GL commands before Chromium's producing ones
even if they were sent to their respective context in the right order.

To prevent this, convert each sync point into a real GL fence sync
and allow Qt to communicate the dependency between consuming and
producing commands down to GL even across threads.

gfx::GLFence can now be converted to a POD TransferableFence to allow
waiting for or destroying the sync using a QOpenGLContext, which
gl_fence.cc wouldn't be able to use through Chromium's GL function
table.

Change-Id: I8a9e2de6ed84b2e16f5504c5d66dc3580b87140a
Reviewed-by: default avatarAndras Becsi <andras.becsi@digia.com>
Reviewed-by: default avatarMichael Bruning <michael.bruning@digia.com>
parent 250eb953
Showing with 90 additions and 1 deletion
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment