mirror of
https://github.com/brl/mutter.git
synced 2025-01-08 10:42:33 +00:00
onscreen/native: Notify frame complete on failure to lock front buffer
If such a failure is followed by a successful frame then the Cogl frame queue would have size 2, leading to an assertion failure in `meta_onscreen_native_notify_frame_complete`: ``` g_assert (!cogl_onscreen_peek_head_frame_info (onscreen)); ``` Notifying on the failure however keeps the Cogl frame queue limited to a size of 1 and we recover gracefully with only a missed frame and a warning message. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3278 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3565>
This commit is contained in:
parent
0eb9c43908
commit
1c58c8cb92
@ -1277,6 +1277,9 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
||||
g_warning ("Failed to lock front buffer on %s: %s",
|
||||
meta_device_file_get_path (render_device_file),
|
||||
error->message);
|
||||
|
||||
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;
|
||||
meta_onscreen_native_notify_frame_complete (onscreen);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user