Fold DoBindContext() helper function into driBindContext().
authorKristian Høgsberg <krh@temari.boston.redhat.com>
Wed, 9 Jan 2008 20:55:05 +0000 (15:55 -0500)
committerKristian Høgsberg <krh@temari.boston.redhat.com>
Thu, 10 Jan 2008 00:08:55 +0000 (19:08 -0500)
src/mesa/drivers/dri/common/dri_util.c

index 2b378a531e038525124a2a368ec0480d03c66a0d..797b2c66f5eaca3aa02457d588e9783c39359c25 100644 (file)
@@ -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 );
-}
 /*@}*/