diff options
author | Kristian Høgsberg <[email protected]> | 2008-03-09 21:19:17 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2008-03-09 21:19:17 -0400 |
commit | 2d5ea175f7fcd65de71b7589435b9a908f998d51 (patch) | |
tree | 0c42cda6e5585e65c78a7848f436b857b2dcb3b2 /src/mesa/drivers/dri/common | |
parent | 0bba0e5be7a4a7275dad1edc34bdcc134ea1f424 (diff) |
DRI2: Pass the context instead of the screen to __dri2ParseEvents().
Makes a lot more sense, since the screen is always implicit in the
DRI drawable, but it may not be possible to track down a context from
just a drawable.
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 733cfae1650..aa6c31ddb84 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -193,8 +193,8 @@ static GLboolean driBindContext(__DRIcontext * ctx, */ if (psp->dri2.enabled) { - __driParseEvents(psp, pdp); - __driParseEvents(psp, prp); + __driParseEvents(pcp, pdp); + __driParseEvents(pcp, prp); } else { if (!pdp->pStamp || *pdp->pStamp != pdp->lastStamp) { DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); @@ -286,17 +286,14 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) } int -__driParseEvents(__DRIscreenPrivate *psp, __DRIdrawablePrivate *pdp) +__driParseEvents(__DRIcontextPrivate *pcp, __DRIdrawablePrivate *pdp) { + __DRIscreenPrivate *psp = pcp->driScreenPriv; __DRIDrawableConfigEvent *dc, *last_dc; __DRIBufferAttachEvent *ba, *last_ba; unsigned int tail, mask, *p, end, total, size, changed; unsigned char *data; size_t rect_size; - __DRIcontextPrivate *pcp = pdp->driContextPriv; - - if (pcp == NULL) - return 0; /* Check for wraparound. */ if (psp->dri2.buffer->prealloc - pdp->dri2.tail > psp->dri2.buffer->size) { diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index e6659811d75..aaaf2427888 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -559,7 +559,7 @@ extern void __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp); extern int -__driParseEvents(__DRIscreenPrivate *psp, __DRIdrawablePrivate *pdp); +__driParseEvents(__DRIcontextPrivate *psp, __DRIdrawablePrivate *pdp); extern float driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, |