diff --git a/cogl/cogl/cogl-onscreen.c b/cogl/cogl/cogl-onscreen.c index ce07145c7..3bcb23307 100644 --- a/cogl/cogl/cogl-onscreen.c +++ b/cogl/cogl/cogl-onscreen.c @@ -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 | diff --git a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c index 8c80d9a25..35f811100 100644 --- a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c +++ b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c @@ -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 (); }