onscreen/native: Deduplicate calls to clutter_frame_set_result
All paths out of `meta_onscreen_native_swap_buffers_with_damage` from here onward would set the same `CLUTTER_FRAME_RESULT_PENDING_PRESENTED` (or terminate with `g_assert_not_reached`). Even failed posts set this result because they will do a `meta_onscreen_native_notify_frame_complete` in `page_flip_feedback_discarded`. (cherry picked from commit 24418b952c5bfd28c3e6bbd6bbc47f2cf37c0a5f) Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441> Signed-off-by: Mingi Sung <sungmg@saltyming.net>
This commit is contained in:
parent
9c5306a96b
commit
367bd34bf4
1 changed files with 3 additions and 9 deletions
|
@ -1456,6 +1456,9 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
g_warn_if_fail (!onscreen_native->next_frame);
|
||||
onscreen_native->next_frame = clutter_frame_ref (frame);
|
||||
|
||||
clutter_frame_set_result (frame,
|
||||
CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
|
||||
kms_crtc = meta_crtc_kms_get_kms_crtc (META_CRTC_KMS (onscreen_native->crtc));
|
||||
kms_device = meta_kms_crtc_get_device (kms_crtc);
|
||||
|
||||
|
@ -1483,8 +1486,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
{
|
||||
meta_renderer_native_queue_power_save_page_flip (renderer_native,
|
||||
onscreen);
|
||||
clutter_frame_set_result (frame,
|
||||
CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1504,8 +1505,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
kms_update = meta_frame_native_steal_kms_update (frame_native);
|
||||
meta_renderer_native_queue_mode_set_update (renderer_native,
|
||||
kms_update);
|
||||
clutter_frame_set_result (frame,
|
||||
CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
return;
|
||||
}
|
||||
else if (meta_renderer_native_has_pending_mode_set (renderer_native))
|
||||
|
@ -1519,8 +1518,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
|
||||
meta_frame_native_steal_kms_update (frame_native);
|
||||
meta_renderer_native_post_mode_set_updates (renderer_native);
|
||||
clutter_frame_set_result (frame,
|
||||
CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -1536,8 +1533,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
kms_update);
|
||||
|
||||
meta_renderer_native_post_mode_set_updates (renderer_native);
|
||||
clutter_frame_set_result (frame,
|
||||
CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -1561,7 +1556,6 @@ meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen *onscreen,
|
|||
|
||||
meta_kms_device_post_update (kms_device, kms_update,
|
||||
META_KMS_UPDATE_FLAG_NONE);
|
||||
clutter_frame_set_result (frame, CLUTTER_FRAME_RESULT_PENDING_PRESENTED);
|
||||
return;
|
||||
|
||||
swap_failed:
|
||||
|
|
Loading…
Reference in a new issue