summaryrefslogtreecommitdiff
path: root/include/GL
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@hinata.boston.redhat.com>2007-05-11 16:43:20 -0400
committerKristian Høgsberg <krh@redhat.com>2007-10-10 18:00:18 -0400
commit5987a03f994af2bb413d1cf984ab01aa095c0943 (patch)
tree55dc5d3b0c8bbbbfbd42d4824bcdde3740cc654b /include/GL
parentaac367f48afc62176faf67aa6f329fbeae2004b4 (diff)
Convert all DRI entrypoints to take pointers to __DRI* types.
The entrypoints take a mix of __DRIscreen * and void * (screen private) arguments (similarly for contexts and drawables). This patch does away with passing the private void pointer and always only passes the fully typed __DRIscreen pointer and always as the first argument. This makes the interface more consistent and increases type safety, and catches a bug where we would pass a screen private to DRIdrawable::getSBC.
Diffstat (limited to 'include/GL')
-rw-r--r--include/GL/internal/dri_interface.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 752dd417dc..178134270d 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -273,7 +273,7 @@ struct __DRIscreenRec {
/**
* Method to destroy the private DRI screen data.
*/
- void (*destroyScreen)(void *screenPrivate);
+ void (*destroyScreen)(__DRIscreen *screen);
/**
* Method to create the private DRI drawable data and initialize the
@@ -298,7 +298,7 @@ struct __DRIscreenRec {
*
* \since Internal API version 20030317.
*/
- int (*getMSC)( void *screenPrivate, int64_t *msc );
+ int (*getMSC)(__DRIscreen *screen, int64_t *msc);
/**
* Functions associated with MESA_allocate_memory.
@@ -348,7 +348,7 @@ struct __DRIcontextRec {
/**
* Method to destroy the private DRI context data.
*/
- void (*destroyContext)(void *contextPrivate);
+ void (*destroyContext)(__DRIcontext *context);
/**
* Opaque pointer to private per context direct rendering data.
@@ -362,9 +362,9 @@ struct __DRIcontextRec {
*
* \since Internal API version 20050727.
*/
- GLboolean (*bindContext)(__DRIdrawable *pdraw,
- __DRIdrawable *pread,
- __DRIcontext *ctx);
+ GLboolean (*bindContext)(__DRIcontext *ctx,
+ __DRIdrawable *pdraw,
+ __DRIdrawable *pread);
/**
* Method to unbind a DRI drawable from a DRI graphics context.
@@ -384,12 +384,12 @@ struct __DRIdrawableRec {
/**
* Method to destroy the private DRI drawable data.
*/
- void (*destroyDrawable)(void *drawablePrivate);
+ void (*destroyDrawable)(__DRIdrawable *drawable);
/**
* Method to swap the front and back buffers.
*/
- void (*swapBuffers)(void *drawablePrivate);
+ void (*swapBuffers)(__DRIdrawable *drawable);
/**
* Opaque pointer to private per drawable direct rendering data.
@@ -403,16 +403,16 @@ struct __DRIdrawableRec {
*
* \since Internal API version 20030317.
*/
- int (*getSBC)(void *drawablePrivate, int64_t *sbc );
+ int (*getSBC)(__DRIdrawable *drawable, int64_t *sbc);
/**
* Wait for the SBC to be greater than or equal target_sbc.
*
* \since Internal API version 20030317.
*/
- int (*waitForSBC)( void *drawablePriv,
- int64_t target_sbc,
- int64_t * msc, int64_t * sbc );
+ int (*waitForSBC)(__DRIdrawable *drawable,
+ int64_t target_sbc,
+ int64_t * msc, int64_t * sbc);
/**
* Wait for the MSC to equal target_msc, or, if that has already passed,
@@ -422,9 +422,9 @@ struct __DRIdrawableRec {
*
* \since Internal API version 20030317.
*/
- int (*waitForMSC)( void *drawablePriv,
- int64_t target_msc, int64_t divisor, int64_t remainder,
- int64_t * msc, int64_t * sbc );
+ int (*waitForMSC)(__DRIdrawable *drawable,
+ int64_t target_msc, int64_t divisor, int64_t remainder,
+ int64_t * msc, int64_t * sbc);
/**
* Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once
@@ -435,7 +435,7 @@ struct __DRIdrawableRec {
*
* \since Internal API version 20030317.
*/
- int64_t (*swapBuffersMSC)(void *drawablePrivate,
+ int64_t (*swapBuffersMSC)(__DRIdrawable *drawable,
int64_t target_msc,
int64_t divisor, int64_t remainder);
@@ -444,16 +444,16 @@ struct __DRIdrawableRec {
*
* \since Internal API version 20030317.
*/
- int (*frameTracking)(void *drawablePrivate, GLboolean enable);
+ int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable);
/**
* Retrieve frame usage information.
*
* \since Internal API version 20030317.
*/
- int (*queryFrameTracking)(void *drawablePrivate,
+ int (*queryFrameTracking)(__DRIdrawable *drawable,
int64_t * sbc, int64_t * missedFrames,
- float * lastMissedUsage, float * usage );
+ float * lastMissedUsage, float * usage);
/**
* Used by drivers that implement the GLX_SGI_swap_control or
@@ -468,7 +468,7 @@ struct __DRIdrawableRec {
*
* \since Internal API version 20060314.
*/
- void (*copySubBuffer)(void *drawablePrivate,
+ void (*copySubBuffer)(__DRIdrawable *drawable,
int x, int y, int w, int h);
};