summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2017-11-09 16:57:29 -0500
committerAdam Jackson <[email protected]>2017-11-13 10:39:33 -0500
commitbc1bc6f512f1ab9fd34086a93fbbc591cd310e79 (patch)
tree17e9f3d60181e93bb60b5808f8359000438d2cf3 /src
parent93200ea26d42664006b1e63382f0b5db1c657384 (diff)
glx: Lower GLX opcode lookup into SendMakeCurrentRequest
Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glx/indirect_glx.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index 4302a8ff288..cfae12f6c0d 100644
--- a/src/glx/indirect_glx.c
+++ b/src/glx/indirect_glx.c
@@ -62,13 +62,13 @@ indirect_destroy_context(struct glx_context *gc)
}
static Bool
-SendMakeCurrentRequest(Display * dpy, CARD8 opcode,
- GLXContextID gc_id, GLXContextTag gc_tag,
- GLXDrawable draw, GLXDrawable read,
- GLXContextTag *out_tag)
+SendMakeCurrentRequest(Display * dpy, GLXContextID gc_id,
+ GLXContextTag gc_tag, GLXDrawable draw,
+ GLXDrawable read, GLXContextTag *out_tag)
{
xGLXMakeCurrentReply reply;
Bool ret;
+ int opcode = __glXSetupForCommand(dpy);
LockDisplay(dpy);
@@ -136,7 +136,6 @@ indirect_bind_context(struct glx_context *gc, struct glx_context *old,
{
GLXContextTag tag;
Display *dpy = gc->psc->dpy;
- int opcode = __glXSetupForCommand(dpy);
Bool sent;
if (old != &dummyContext && !old->isDirect && old->psc->dpy == dpy) {
@@ -146,7 +145,7 @@ indirect_bind_context(struct glx_context *gc, struct glx_context *old,
tag = 0;
}
- sent = SendMakeCurrentRequest(dpy, opcode, gc->xid, tag, draw, read,
+ sent = SendMakeCurrentRequest(dpy, gc->xid, tag, draw, read,
&gc->currentContextTag);
if (!IndirectAPI)
@@ -160,7 +159,6 @@ static void
indirect_unbind_context(struct glx_context *gc, struct glx_context *new)
{
Display *dpy = gc->psc->dpy;
- int opcode = __glXSetupForCommand(dpy);
if (gc == new)
return;
@@ -170,8 +168,8 @@ indirect_unbind_context(struct glx_context *gc, struct glx_context *new)
* to send a request to the dpy to unbind the previous context.
*/
if (!new || new->isDirect || new->psc->dpy != dpy) {
- SendMakeCurrentRequest(dpy, opcode, None,
- gc->currentContextTag, None, None, NULL);
+ SendMakeCurrentRequest(dpy, None, gc->currentContextTag, None, None,
+ NULL);
gc->currentContextTag = 0;
}
}