cogl: Update latest sync fd also from cogl_gl_framebuffer_flush/finish
This ensures that any drawing for screen casting is reflected in the
sync fd.
Fixes: 99209958b9
("cogl: Store latest GPU work completed sync fd")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3946>
This commit is contained in:
parent
f2642dbc31
commit
61ae9eedb6
2 changed files with 8 additions and 3 deletions
|
@ -291,11 +291,10 @@ cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
|
||||
_cogl_framebuffer_flush_journal (framebuffer);
|
||||
|
||||
/* Update our "latest" sync fd to contain all previous work */
|
||||
_cogl_context_update_sync (context);
|
||||
|
||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_SYNC_FRAME)))
|
||||
cogl_framebuffer_finish (framebuffer);
|
||||
else
|
||||
_cogl_context_update_sync (context);
|
||||
|
||||
cogl_framebuffer_discard_buffers (framebuffer,
|
||||
COGL_BUFFER_BIT_DEPTH |
|
||||
|
|
|
@ -294,6 +294,9 @@ cogl_gl_framebuffer_finish (CoglFramebufferDriver *driver)
|
|||
{
|
||||
CoglContext *ctx = context_from_driver (driver);
|
||||
|
||||
/* Update our "latest" sync fd to contain all previous work */
|
||||
_cogl_context_update_sync (ctx);
|
||||
|
||||
ctx->glFinish ();
|
||||
}
|
||||
|
||||
|
@ -302,6 +305,9 @@ cogl_gl_framebuffer_flush (CoglFramebufferDriver *driver)
|
|||
{
|
||||
CoglContext *ctx = context_from_driver (driver);
|
||||
|
||||
/* Update our "latest" sync fd to contain all previous work */
|
||||
_cogl_context_update_sync (ctx);
|
||||
|
||||
ctx->glFlush ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue