summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2018-03-13 16:00:51 +0100
committerAdam Jackson <ajax@redhat.com>2018-03-28 14:36:44 -0400
commit902429f077325b98e30ede2710bd7a88440d2937 (patch)
tree7b4f32c61cb2ee737f65aa66a46f6d5f3a48048a /present
parenta337949f99bc473ea0ae0af64736eae3d5b39399 (diff)
present: Add exported init function of window flip mode
Allow drivers now to initialize window flip mode. Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r--present/present.h2
-rw-r--r--present/present_screen.c23
2 files changed, 24 insertions, 1 deletions
diff --git a/present/present.h b/present/present.h
index affb75f35..3d0b9722b 100644
--- a/present/present.h
+++ b/present/present.h
@@ -174,6 +174,8 @@ present_event_abandon(RRCrtcPtr crtc);
extern _X_EXPORT Bool
present_screen_init(ScreenPtr screen, present_screen_info_ptr info);
+extern _X_EXPORT Bool
+present_wnmd_screen_init(ScreenPtr screen, present_wnmd_info_ptr info);
typedef void (*present_complete_notify_proc)(WindowPtr window,
CARD8 kind,
diff --git a/present/present_screen.c b/present/present_screen.c
index 8ad14ad17..c7e37c5fd 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -239,7 +239,28 @@ present_screen_priv_init(ScreenPtr screen)
}
/*
- * Initialize a screen for use with present
+ * Initialize a screen for use with present in window flip mode (wnmd)
+ */
+int
+present_wnmd_screen_init(ScreenPtr screen, present_wnmd_info_ptr info)
+{
+ if (!present_screen_register_priv_keys())
+ return FALSE;
+
+ if (!present_screen_priv(screen)) {
+ present_screen_priv_ptr screen_priv = present_screen_priv_init(screen);
+ if (!screen_priv)
+ return FALSE;
+
+ screen_priv->wnmd_info = info;
+ present_wnmd_init_mode_hooks(screen_priv);
+ }
+
+ return TRUE;
+}
+
+/*
+ * Initialize a screen for use with present in default screen flip mode (scmd)
*/
int
present_screen_init(ScreenPtr screen, present_screen_info_ptr info)