[PATCH 07/11] glx: Initialize all context fields together
Ian Romanick
idr at freedesktop.org
Fri Dec 23 15:18:25 PST 2011
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
glx/glxcmds.c | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index ba6c69b..8a32a22 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -287,12 +287,16 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
return BadAlloc;
}
- /*
- ** Initially, setup the part of the context that could be used by
- ** a GL core that needs windowing information (e.g., Mesa).
- */
+ /* Initialize the GLXcontext structure.
+ */
glxc->pGlxScreen = pGlxScreen;
glxc->config = config;
+ glxc->id = gcId;
+ glxc->share_id = shareList;
+ glxc->idExists = GL_TRUE;
+ glxc->isCurrent = GL_FALSE;
+ glxc->isDirect = isDirect;
+ glxc->renderMode = GL_RENDER;
/*
** Register this context as a resource.
@@ -303,17 +307,6 @@ DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
return BadAlloc;
}
- /*
- ** Finally, now that everything is working, setup the rest of the
- ** context.
- */
- glxc->id = gcId;
- glxc->share_id = shareList;
- glxc->idExists = GL_TRUE;
- glxc->isCurrent = GL_FALSE;
- glxc->isDirect = isDirect;
- glxc->renderMode = GL_RENDER;
-
__glXAddToContextList(glxc);
return Success;
--
1.7.6.4
More information about the xorg-devel
mailing list