st/xorg: Create winsys hooks that we call into
authorJakob Bornecrantz <jakob@vmware.com>
Tue, 24 Nov 2009 21:55:24 +0000 (22:55 +0100)
committerJakob Bornecrantz <jakob@vmware.com>
Tue, 1 Dec 2009 16:29:41 +0000 (17:29 +0100)
src/gallium/state_trackers/xorg/xorg_driver.c
src/gallium/state_trackers/xorg/xorg_tracker.h

index 129159129869d6a6177efb245c374f16b7ec7891..da86295c316922ee2af3266f12bec1e150b09e49 100644 (file)
@@ -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);
index c6c7b2fe158d6931291b8822068fc27b5cbfe300..d5fc18448ef3d26e8fbc8eee6f742c781f528936 100644 (file)
@@ -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