Mesa (mesa_7_7_branch): st/xorg: Create winsys hooks that we call into

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Wed Dec 2 13:55:22 PST 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: bb80a93c9eabb430914011513852b18c943c8cfa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb80a93c9eabb430914011513852b18c943c8cfa

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Tue Nov 24 22:55:24 2009 +0100

st/xorg: Create winsys hooks that we call into

---

 src/gallium/state_trackers/xorg/xorg_driver.c  |    6 ++++++
 src/gallium/state_trackers/xorg/xorg_tracker.h |    5 +++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 1291591..da86295 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -652,6 +652,9 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
     if (serverGeneration == 1)
 	xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
 
+    if (ms->winsys_screen_init)
+	ms->winsys_screen_init(pScrn);
+
     return drv_enter_vt(scrnIndex, 1);
 }
 
@@ -768,6 +771,9 @@ drv_close_screen(int scrnIndex, ScreenPtr pScreen)
 	drv_leave_vt(scrnIndex, 0);
     }
 
+    if (ms->winsys_screen_close)
+	ms->winsys_screen_close(pScrn);
+
 #ifdef DRI2
     if (ms->screen)
 	xorg_dri2_close(pScreen);
diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h
index c6c7b2f..d5fc184 100644
--- a/src/gallium/state_trackers/xorg/xorg_tracker.h
+++ b/src/gallium/state_trackers/xorg/xorg_tracker.h
@@ -114,6 +114,11 @@ typedef struct _modesettingRec
     Bool noEvict;
     Bool debug_fallback;
 
+    /* winsys hocks */
+    Bool (*winsys_screen_init)(ScrnInfoPtr pScr);
+    Bool (*winsys_screen_close)(ScrnInfoPtr pScr);
+    void *winsys_priv;
+
 #ifdef DRM_MODE_FEATURE_DIRTYFB
     DamagePtr damage;
 #endif



More information about the mesa-commit mailing list