summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2018-03-13 16:00:44 +0100
committerAdam Jackson <ajax@redhat.com>2018-03-28 14:36:30 -0400
commit84e47f3fe68f05f7b0b762e96acd4c95fa8000ca (patch)
tree5678044a72f5698640c6f3e7ad9cbbd24c967fb3 /present
parent3aaaac0be573fb09a206966075d81ebe0510ca23 (diff)
present: Add present_window_priv properties for window flip mode
For window flip mode data about flips needs to be stored per window. Add properties to 'present_window_priv' and initialize them on creation. Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'present')
-rw-r--r--present/present_priv.h10
-rw-r--r--present/present_screen.c6
2 files changed, 16 insertions, 0 deletions
diff --git a/present/present_priv.h b/present/present_priv.h
index ba607e279..3fba10d73 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -206,12 +206,22 @@ typedef struct present_event {
} present_event_rec;
typedef struct present_window_priv {
+ WindowPtr window;
present_event_ptr events;
RRCrtcPtr crtc; /* Last reported CRTC from get_ust_msc */
uint64_t msc_offset;
uint64_t msc; /* Last reported MSC from the current crtc */
struct xorg_list vblank;
struct xorg_list notifies;
+
+ /* Used for window flips */
+ uint64_t event_id;
+ struct xorg_list exec_queue;
+ struct xorg_list flip_queue;
+ struct xorg_list idle_queue;
+
+ present_vblank_ptr flip_pending;
+ present_vblank_ptr flip_active;
} present_window_priv_rec, *present_window_priv_ptr;
#define PresentCrtcNeverSet ((RRCrtcPtr) 1)
diff --git a/present/present_screen.c b/present/present_screen.c
index 868eaf85b..d6c9a5e39 100644
--- a/present/present_screen.c
+++ b/present/present_screen.c
@@ -45,6 +45,12 @@ present_get_window_priv(WindowPtr window, Bool create)
return NULL;
xorg_list_init(&window_priv->vblank);
xorg_list_init(&window_priv->notifies);
+
+ xorg_list_init(&window_priv->exec_queue);
+ xorg_list_init(&window_priv->flip_queue);
+ xorg_list_init(&window_priv->idle_queue);
+
+ window_priv->window = window;
window_priv->crtc = PresentCrtcNeverSet;
dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv);
return window_priv;