[PATCH xserver 4/4] glx: Remove glx{Suspend,Resume}Clients
Adam Jackson
ajax at redhat.com
Thu Jun 29 14:24:36 UTC 2017
This is handled correctly in the DRI extensions now. Importantly it is
not done for DRI3, and does not need to be.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
glx/glxext.c | 59 +--------------------------------------------------------
glx/glxserver.h | 8 --------
2 files changed, 1 insertion(+), 66 deletions(-)
diff --git a/glx/glxext.c b/glx/glxext.c
index e88bbd107..69f79874a 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -100,9 +100,7 @@ ContextGone(__GLXcontext * cx, XID id)
return True;
}
-static __GLXcontext *glxPendingDestroyContexts;
static __GLXcontext *glxAllContexts;
-static int glxBlockClients;
/*
** Destroy routine that gets called when a drawable is freed. A drawable
@@ -197,17 +195,7 @@ __glXFreeContext(__GLXcontext * cx)
lastGLContext = NULL;
}
- /* We can get here through both regular dispatching from
- * __glXDispatch() or as a callback from the resource manager. In
- * the latter case we need to lift the DRI lock manually. */
-
- if (!glxBlockClients) {
- cx->destroy(cx);
- }
- else {
- cx->next = glxPendingDestroyContexts;
- glxPendingDestroyContexts = cx;
- }
+ cx->destroy(cx);
return GL_TRUE;
}
@@ -493,40 +481,6 @@ __glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error)
/************************************************************************/
-void
-glxSuspendClients(void)
-{
- int i;
-
- for (i = 1; i < currentMaxClients; i++) {
- if (clients[i] && glxGetClient(clients[i])->inUse)
- IgnoreClient(clients[i]);
- }
-
- glxBlockClients = TRUE;
-}
-
-void
-glxResumeClients(void)
-{
- __GLXcontext *cx, *next;
- int i;
-
- glxBlockClients = FALSE;
-
- for (i = 1; i < currentMaxClients; i++) {
- if (clients[i] && glxGetClient(clients[i])->inUse)
- AttendClient(clients[i]);
- }
-
- for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
- next = cx->next;
-
- cx->destroy(cx);
- }
- glxPendingDestroyContexts = NULL;
-}
-
static glx_gpa_proc _get_proc_address;
void
@@ -556,8 +510,6 @@ __glXDispatch(ClientPtr client)
opcode = stuff->glxCode;
cl = glxGetClient(client);
- /* Mark it in use so we suspend it on VT switch. */
- cl->inUse = TRUE;
/*
** If we're expecting a glXRenderLarge request, this better be one.
@@ -567,15 +519,6 @@ __glXDispatch(ClientPtr client)
return __glXError(GLXBadLargeRequest);
}
- /* If we're currently blocking GLX clients, just put this guy to
- * sleep, reset the request and return. */
- if (glxBlockClients) {
- ResetCurrentRequest(client);
- client->sequence--;
- IgnoreClient(client);
- return Success;
- }
-
/*
** Use the opcode to index into the procedure table.
*/
diff --git a/glx/glxserver.h b/glx/glxserver.h
index e7ea8c282..f08df13f0 100644
--- a/glx/glxserver.h
+++ b/glx/glxserver.h
@@ -107,9 +107,6 @@ enum {
GLX_ALL_VISUALS
};
-void glxSuspendClients(void);
-void glxResumeClients(void);
-
typedef void (*glx_func_ptr)(void);
typedef glx_func_ptr (*glx_gpa_proc)(const char *);
void __glXsetGetProcAddress(glx_gpa_proc get_proc_address);
@@ -129,11 +126,6 @@ __glXregisterPresentCompleteNotify(void);
*/
struct __GLXclientStateRec {
/*
- ** Whether this structure is currently being used to support a client.
- */
- Bool inUse;
-
- /*
** Buffer for returned data.
*/
GLbyte *returnBuf;
--
2.13.0
More information about the xorg-devel
mailing list