summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-03-18 17:03:09 -0400
committerAdam Jackson <ajax@redhat.com>2011-03-28 12:46:38 -0400
commitc327d07cc68802256c679a65d78f98f17327abda (patch)
tree1160cf1ff8d1cb7291119db54ffb34bbbfc1ec5d /glx
parenta48dadc98a28c969741979b70b7a639f24f4cbbd (diff)
glx: Remove ->forceCurrent from the context vtable
All the implementations of makeCurrent and forceCurrent are identical, so just use makeCurrent everywhere. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxcontext.h2
-rw-r--r--glx/glxdri.c14
-rw-r--r--glx/glxdri2.c14
-rw-r--r--glx/glxdriswrast.c14
-rw-r--r--glx/glxext.c2
5 files changed, 1 insertions, 45 deletions
diff --git a/glx/glxcontext.h b/glx/glxcontext.h
index 79bc083a8..65d51f507 100644
--- a/glx/glxcontext.h
+++ b/glx/glxcontext.h
@@ -53,8 +53,6 @@ struct __GLXcontext {
int (*copy) (__GLXcontext *dst,
__GLXcontext *src,
unsigned long mask);
- int (*forceCurrent) (__GLXcontext *context);
-
Bool (*wait) (__GLXcontext *context,
__GLXclientState *cl,
int *error);
diff --git a/glx/glxdri.c b/glx/glxdri.c
index 3a573372a..c87ac9a65 100644
--- a/glx/glxdri.c
+++ b/glx/glxdri.c
@@ -335,19 +335,6 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
src->driContext, mask);
}
-static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
-{
- __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
- __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
- __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
- __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
-
- return (*screen->core->bindContext)(context->driContext,
- draw->driDrawable,
- read->driDrawable);
-}
-
static void
glxFillAlphaChannel (CARD32 *pixels, CARD32 rowstride, int width, int height)
{
@@ -641,7 +628,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
context->base.makeCurrent = __glXDRIcontextMakeCurrent;
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
context->base.copy = __glXDRIcontextCopy;
- context->base.forceCurrent = __glXDRIcontextForceCurrent;
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
/* Find the requested X visual */
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 18927d75d..e8961e255 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -283,19 +283,6 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
src->driContext, mask);
}
-static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
-{
- __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
- __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
- __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
- __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
-
- return (*screen->core->bindContext)(context->driContext,
- draw->driDrawable,
- read->driDrawable);
-}
-
static Bool
__glXDRIcontextWait(__GLXcontext *baseContext,
__GLXclientState *cl, int *error)
@@ -411,7 +398,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
context->base.makeCurrent = __glXDRIcontextMakeCurrent;
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
context->base.copy = __glXDRIcontextCopy;
- context->base.forceCurrent = __glXDRIcontextForceCurrent;
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
context->base.wait = __glXDRIcontextWait;
diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
index 78b24ff62..ed142c167 100644
--- a/glx/glxdriswrast.c
+++ b/glx/glxdriswrast.c
@@ -174,19 +174,6 @@ __glXDRIcontextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc,
src->driContext, mask);
}
-static int
-__glXDRIcontextForceCurrent(__GLXcontext *baseContext)
-{
- __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext;
- __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv;
- __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv;
- __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen;
-
- return (*screen->core->bindContext)(context->driContext,
- draw->driDrawable,
- read->driDrawable);
-}
-
#ifdef __DRI_TEX_BUFFER
static int
@@ -289,7 +276,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
context->base.makeCurrent = __glXDRIcontextMakeCurrent;
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
context->base.copy = __glXDRIcontextCopy;
- context->base.forceCurrent = __glXDRIcontextForceCurrent;
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
context->driContext =
diff --git a/glx/glxext.c b/glx/glxext.c
index 16315b876..e083c6cf8 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -420,7 +420,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
/* Make this context the current one for the GL. */
if (!cx->isDirect) {
- if (!(*cx->forceCurrent)(cx)) {
+ if (!(*cx->makeCurrent)(cx)) {
/* Bind failed, and set the error code. Bummer */
cl->client->errorValue = cx->id;
*error = __glXError(GLXBadContextState);