mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
onscreen/native: Don't swap the buffer if page flip failed
If a page flip failed, it means the current active framebuffer didn't change, meaning we shouldn't swap it in mutter either. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2854>
This commit is contained in:
parent
f6b75eef19
commit
51ff3fa194
@ -145,6 +145,14 @@ meta_onscreen_native_swap_drm_fb (CoglOnscreen *onscreen)
|
||||
g_clear_object (&onscreen_native->gbm.next_fb);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_onscreen_native_clear_next_fb (CoglOnscreen *onscreen)
|
||||
{
|
||||
MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
|
||||
|
||||
g_clear_object (&onscreen_native->gbm.next_fb);
|
||||
}
|
||||
|
||||
static void
|
||||
maybe_update_frame_info (MetaCrtc *crtc,
|
||||
CoglFrameInfo *frame_info,
|
||||
@ -327,7 +335,7 @@ page_flip_feedback_discarded (MetaKmsCrtc *kms_crtc,
|
||||
frame_info->flags |= COGL_FRAME_INFO_FLAG_SYMBOLIC;
|
||||
|
||||
meta_onscreen_native_notify_frame_complete (onscreen);
|
||||
meta_onscreen_native_swap_drm_fb (onscreen);
|
||||
meta_onscreen_native_clear_next_fb (onscreen);
|
||||
}
|
||||
|
||||
static const MetaKmsPageFlipListenerVtable page_flip_listener_vtable = {
|
||||
|
Loading…
Reference in New Issue
Block a user