diff options
author | Thomas Hellstrom <[email protected]> | 2010-02-15 14:10:19 +0100 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2010-02-27 02:12:47 +0000 |
commit | 55e5737bae6b88c2d1bc4c0d94e11548518659b8 (patch) | |
tree | e5d629c13e145d4b0b82d9754846de25ce3f263d /src/gallium/state_trackers/xorg/xorg_tracker.h | |
parent | ab8a232b2cad965501e3778219e957509a078757 (diff) |
st/xorg: Encapsulate all customizable stuff in a separate class.
This avoids exposing the ms driver structure to the winsys,
and nicely encapsulates driver customizable stuff.
In the future more things might be customizable by the winsys, like
throttling, 3D readback etc.
Signed-off-by: Thomas Hellstrom <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_tracker.h')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_tracker.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_tracker.h b/src/gallium/state_trackers/xorg/xorg_tracker.h index 58bb60a721d..2f5cc64d9c5 100644 --- a/src/gallium/state_trackers/xorg/xorg_tracker.h +++ b/src/gallium/state_trackers/xorg/xorg_tracker.h @@ -67,6 +67,14 @@ typedef struct #define XORG_NR_FENCES 3 +typedef struct _CustomizerRec +{ + Bool (*winsys_screen_init)(struct _CustomizerRec *cust, int fd); + Bool (*winsys_screen_close)(struct _CustomizerRec *cust); + Bool (*winsys_enter_vt)(struct _CustomizerRec *cust); + Bool (*winsys_leave_vt)(struct _CustomizerRec *cust); +} CustomizerRec, *CustomizerPtr; + typedef struct _modesettingRec { /* drm */ @@ -117,12 +125,7 @@ typedef struct _modesettingRec Bool accelerate_2d; Bool debug_fallback; - /* winsys hocks */ - Bool (*winsys_screen_init)(ScrnInfoPtr pScr); - Bool (*winsys_screen_close)(ScrnInfoPtr pScr); - Bool (*winsys_enter_vt)(ScrnInfoPtr pScr); - Bool (*winsys_leave_vt)(ScrnInfoPtr pScr); - void *winsys_priv; + CustomizerPtr cust; #ifdef DRM_MODE_FEATURE_DIRTYFB DamagePtr damage; @@ -131,6 +134,9 @@ typedef struct _modesettingRec #define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate)) +CustomizerPtr xorg_customizer(ScrnInfoPtr pScrn); + +Bool xorg_has_gallium(ScrnInfoPtr pScrn); /*********************************************************************** * xorg_exa.c |