DRI2: Add event buffer head as an argument to driCreateNewDrawable().

The DRI driver needs to know where in the buffer to start reading.
This commit is contained in:
Kristian Høgsberg 2008-03-09 21:16:30 -04:00
parent 810e0549af
commit 0bba0e5be7
2 changed files with 4 additions and 2 deletions

View File

@ -482,6 +482,7 @@ struct __DRIscreenRec {
const __GLcontextModes *modes,
__DRIdrawable *pdraw,
drm_drawable_t hwDrawable,
unsigned int head,
int renderType, const int *attrs);
/**

View File

@ -49,6 +49,7 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
const __GLcontextModes *modes,
__DRIdrawable *pdraw,
drm_drawable_t hwDrawable,
unsigned int head,
int renderType, const int *attrs);
static void driDestroyDrawable(__DRIdrawable *drawable);
@ -552,13 +553,13 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
const __GLcontextModes *modes,
__DRIdrawable *pdraw,
drm_drawable_t hwDrawable,
unsigned int head,
int renderType,
const int *attrs)
{
__DRIscreenPrivate *psp;
__DRIdrawablePrivate *pdp;
pdraw->private = NULL;
/* Since pbuffers are not yet supported, no drawable attributes are
@ -612,7 +613,7 @@ static void *driCreateNewDrawable(__DRIscreen *screen,
pdp->swapBuffers = psp->DriverAPI.SwapBuffers;
if (psp->dri2.enabled) {
pdp->dri2.tail = 0;
pdp->dri2.tail = head;
pdp->pBackClipRects = _mesa_malloc(sizeof *pdp->pBackClipRects);
}