stage-impl: Ensure that a sync object is created in headless mode
During an onscreen swap, the cogl_onscreen_swap_buffers_with_damage()
function ensures that the Cogl renderer creates a sync object every
frame. This sync object is later shared with the Wayland clients that
utilize the explicit sync protocol.
However, in headless mode, the function mentioned above is not called.
As a result, the sync object the Cogl renderer stores seems to be not
created. This causes cogl_context_get_latest_sync_fd() function to
return an invalid sync fd, causing Mutter to not be able to materialize
the sync timeline point that the clients wait for when the explicit sync
protocol is in use.
This change simply adds a call to the cogl_framebuffer_flush() function
to the offscreen swap path to make sure that there is a sync object that
can be shared with the clients, which will be signalled when all the
queued operations before the swap are completed.
Signed-off-by: Doğukan Korkmaztürk <dkorkmazturk@nvidia.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4056>
(cherry picked from commit 6a0cc1371c
)
This commit is contained in:
parent
6e1e870e5a
commit
95f9bb2f03
1 changed files with 2 additions and 0 deletions
|
@ -328,6 +328,8 @@ swap_framebuffer (ClutterStageWindow *stage_window,
|
|||
meta_topic (META_DEBUG_BACKEND,
|
||||
"fake offscreen swap (framebuffer: %p)",
|
||||
framebuffer);
|
||||
|
||||
cogl_framebuffer_flush (framebuffer);
|
||||
meta_stage_view_perform_fake_swap (view, priv->global_frame_counter);
|
||||
priv->global_frame_counter++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue