dri: reorder as driver,screen,context,drawable

This commit is contained in:
George Sapountzis 2011-11-03 13:14:31 +02:00
parent e438a36d83
commit 96bd41b315

View file

@ -108,6 +108,92 @@ struct __DriverAPIRec {
extern const struct __DriverAPIRec driDriverAPI;
/**
* Per-screen private driver information.
*/
struct __DRIscreenRec {
/**
* Current screen's number
*/
int myNum;
/**
* File descriptor returned when the kernel device driver is opened.
*
* Used to:
* - authenticate client to kernel
* - map the frame buffer, SAREA, etc.
* - close the kernel device driver
*/
int fd;
/**
* DRM (kernel module) version information.
*/
__DRIversion drm_version;
/**
* Device-dependent private information (not stored in the SAREA).
*
* This pointer is never touched by the DRI layer.
*/
void *driverPrivate;
void *loaderPrivate;
const __DRIextension **extensions;
const __DRIswrastLoaderExtension *swrast_loader;
struct {
/* Flag to indicate that this is a DRI2 screen. Many of the above
* fields will not be valid or initializaed in that case. */
__DRIdri2LoaderExtension *loader;
__DRIimageLookupExtension *image;
__DRIuseInvalidateExtension *useInvalidate;
} dri2;
driOptionCache optionInfo;
driOptionCache optionCache;
unsigned int api_mask;
};
/**
* Per-context private driver information.
*/
struct __DRIcontextRec {
/**
* Device driver's private context data. This structure is opaque.
*/
void *driverPrivate;
/**
* The loaders's private context data. This structure is opaque.
*/
void *loaderPrivate;
/**
* Pointer to drawable currently bound to this context for drawing.
*/
__DRIdrawable *driDrawablePriv;
/**
* Pointer to drawable currently bound to this context for reading.
*/
__DRIdrawable *driReadablePriv;
/**
* Pointer to screen on which this context was created.
*/
__DRIscreen *driScreenPriv;
struct {
int draw_stamp;
int read_stamp;
} dri2;
};
/**
* Per-drawable private DRI driver information.
*/
@ -164,92 +250,6 @@ struct __DRIdrawableRec {
} dri2;
};
/**
* Per-context private driver information.
*/
struct __DRIcontextRec {
/**
* Device driver's private context data. This structure is opaque.
*/
void *driverPrivate;
/**
* The loaders's private context data. This structure is opaque.
*/
void *loaderPrivate;
/**
* Pointer to drawable currently bound to this context for drawing.
*/
__DRIdrawable *driDrawablePriv;
/**
* Pointer to drawable currently bound to this context for reading.
*/
__DRIdrawable *driReadablePriv;
/**
* Pointer to screen on which this context was created.
*/
__DRIscreen *driScreenPriv;
struct {
int draw_stamp;
int read_stamp;
} dri2;
};
/**
* Per-screen private driver information.
*/
struct __DRIscreenRec {
/**
* Current screen's number
*/
int myNum;
/**
* File descriptor returned when the kernel device driver is opened.
*
* Used to:
* - authenticate client to kernel
* - map the frame buffer, SAREA, etc.
* - close the kernel device driver
*/
int fd;
/**
* DRM (kernel module) version information.
*/
__DRIversion drm_version;
/**
* Device-dependent private information (not stored in the SAREA).
*
* This pointer is never touched by the DRI layer.
*/
void *driverPrivate;
void *loaderPrivate;
const __DRIextension **extensions;
const __DRIswrastLoaderExtension *swrast_loader;
struct {
/* Flag to indicate that this is a DRI2 screen. Many of the above
* fields will not be valid or initializaed in that case. */
__DRIdri2LoaderExtension *loader;
__DRIimageLookupExtension *image;
__DRIuseInvalidateExtension *useInvalidate;
} dri2;
driOptionCache optionInfo;
driOptionCache optionCache;
unsigned int api_mask;
};
extern void
dri2InvalidateDrawable(__DRIdrawable *drawable);