<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:Andras Becsi <andras.becsi@digia.com> Reviewed-by:
Michael Bruning <michael.bruning@digia.com>
Showing
Please register or sign in to comment