onscreen/native: Add function meta_onscreen_native_discard_pending_swaps
(cherry picked from commit 06a4a06c94e832da0a2cd59da9a592e4a409e9c6) 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
b41108f3d3
commit
472a1cc51d
2 changed files with 13 additions and 0 deletions
|
@ -2180,6 +2180,17 @@ post_finish_frame (MetaOnscreenNative *onscreen_native,
|
|||
META_KMS_UPDATE_FLAG_NONE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_onscreen_native_discard_pending_swaps (CoglOnscreen *onscreen)
|
||||
{
|
||||
MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
|
||||
|
||||
onscreen_native->swaps_pending = 0;
|
||||
|
||||
g_clear_pointer (&onscreen_native->superseded_frame, clutter_frame_unref);
|
||||
g_clear_pointer (&onscreen_native->next_frame, clutter_frame_unref);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
should_surface_be_sharable (CoglOnscreen *onscreen)
|
||||
{
|
||||
|
|
|
@ -48,6 +48,8 @@ void meta_onscreen_native_dummy_power_save_page_flip (CoglOnscreen *onscreen);
|
|||
gboolean meta_onscreen_native_is_buffer_scanout_compatible (CoglOnscreen *onscreen,
|
||||
CoglScanout *scanout);
|
||||
|
||||
void meta_onscreen_native_discard_pending_swaps (CoglOnscreen *onscreen);
|
||||
|
||||
void meta_onscreen_native_set_view (CoglOnscreen *onscreen,
|
||||
MetaRendererView *view);
|
||||
|
||||
|
|
Loading…
Reference in a new issue