[mutter] MetaOnscreenNative: Make flip waiting state more generic
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaOnscreenNative: Make flip waiting state more generic
- Date: Thu, 17 Nov 2016 16:08:01 +0000 (UTC)
commit 59b4b5e9e8ed9ac8d3c480cbafadebf842d5a92d
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Sep 29 22:15:26 2016 +0800
MetaOnscreenNative: Make flip waiting state more generic
Use a boolean to keep track whether a flipped event is pending or not,
and use that instead of looking at the framebuffer id field.
https://bugzilla.gnome.org/show_bug.cgi?id=773629
src/backends/native/meta-renderer-native.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 9acf7fc..e59fbab 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -73,6 +73,7 @@ typedef struct _MetaOnscreenNative
struct gbm_bo *next_bo;
} gbm;
+ gboolean pending_queue_swap_notify;
gboolean pending_swap_notify;
gboolean pending_set_crtc;
@@ -399,6 +400,8 @@ on_crtc_flipped (GClosure *closure,
onscreen_native->pending_flips--;
if (onscreen_native->pending_flips == 0)
{
+ onscreen_native->pending_queue_swap_notify = FALSE;
+
meta_onscreen_native_queue_swap_notify (onscreen);
meta_onscreen_native_swap_drm_fb (onscreen);
}
@@ -425,8 +428,12 @@ flip_closure_destroyed (MetaRendererView *view)
onscreen_native->gbm.next_bo);
onscreen_native->gbm.next_bo = NULL;
onscreen_native->gbm.next_fb_id = 0;
+ }
+ if (onscreen_native->pending_queue_swap_notify)
+ {
meta_onscreen_native_queue_swap_notify (onscreen);
+ onscreen_native->pending_queue_swap_notify = FALSE;
}
g_object_unref (view);
@@ -586,6 +593,8 @@ meta_onscreen_native_flip_crtcs (CoglOnscreen *onscreen)
meta_onscreen_native_swap_drm_fb (onscreen);
}
+ onscreen_native->pending_queue_swap_notify = TRUE;
+
g_closure_unref (flip_closure);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]