diff options
author | Kristian Høgsberg <krh@temari.boston.redhat.com> | 2008-01-09 15:55:05 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@temari.boston.redhat.com> | 2008-01-09 19:08:55 -0500 |
commit | f1139e4c662c47357ee054c2e004b13c9f74ffe1 (patch) | |
tree | b719de338ad8a722c7e931f0067ec938c8ea180d /src/mesa/drivers/dri | |
parent | 4225876bf03dfe6d4b291eed9c00e37e949f8148 (diff) |
Fold DoBindContext() helper function into driBindContext().
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 2b378a531e..797b2c66f5 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -172,15 +172,23 @@ static GLboolean driUnbindContext(__DRIcontext *ctx) * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent * function. */ -static GLboolean DoBindContext(__DRIcontext *ctx, - __DRIdrawable *pdraw, - __DRIdrawable *pread) +static GLboolean driBindContext(__DRIcontext * ctx, + __DRIdrawable *pdraw, + __DRIdrawable *pread) { __DRIdrawablePrivate *pdp; __DRIdrawablePrivate *prp; __DRIcontextPrivate * const pcp = ctx->private; __DRIscreenPrivate *psp = pcp->driScreenPriv; + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driBindContext. + */ + + if (ctx == NULL || pdraw == None || pread == None) + return GL_FALSE; + pdp = (__DRIdrawablePrivate *) pdraw->private; prp = (__DRIdrawablePrivate *) pread->private; @@ -215,26 +223,6 @@ static GLboolean DoBindContext(__DRIcontext *ctx, return GL_TRUE; } - -/** - * This function takes both a read buffer and a draw buffer. This is needed - * for \c glXMakeCurrentReadSGI or GLX 1.3's \c glXMakeContextCurrent - * function. - */ -static GLboolean driBindContext(__DRIcontext * ctx, - __DRIdrawable *pdraw, - __DRIdrawable *pread) -{ - /* - ** Assume error checking is done properly in glXMakeCurrent before - ** calling driBindContext. - */ - - if (ctx == NULL || pdraw == None || pread == None) - return GL_FALSE; - - return DoBindContext( ctx, pdraw, pread ); -} /*@}*/ |