summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-07-19 19:42:44 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-07-19 23:02:08 -0700
commit50ec4a25b66611c4f864fb7fb30065ab575a1d85 (patch)
tree95cf3e82c338c57c975d52a5d70b813d334a310e
parent55ef10975e2e543ff99f7a75dd65722dc96ff873 (diff)
XQuartz: DRI: Dead code removal
Also add some comments that weren't merged in from server-1.4-apple's 99babae1326485c27eb9253db83afdd6aef9e362 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 0ebe45a717faa6464d3b1ab73e30570518ee4798)
-rw-r--r--hw/xquartz/GL/indirect.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/xquartz/GL/indirect.c b/hw/xquartz/GL/indirect.c
index e9f0ffa98..26344350b 100644
--- a/hw/xquartz/GL/indirect.c
+++ b/hw/xquartz/GL/indirect.c
@@ -93,6 +93,15 @@ typedef struct __GLXAquaScreen __GLXAquaScreen;
typedef struct __GLXAquaContext __GLXAquaContext;
typedef struct __GLXAquaDrawable __GLXAquaDrawable;
+/*
+ * The following structs must keep the base as the first member.
+ * It's used to treat the start of the struct as a different struct
+ * in GLX.
+ *
+ * Note: these structs should be initialized with xcalloc or memset
+ * prior to usage, and some of them require initializing
+ * the base with function pointers.
+ */
struct __GLXAquaScreen {
__GLXscreen base;
int index;
@@ -202,7 +211,11 @@ static int __glXAquaContextLoseCurrent(__GLXcontext *baseContext) {
if (gl_err != 0)
ErrorF("CGLSetCurrentContext error: %s\n", CGLErrorString(gl_err));
- __glXLastContext = NULL; // Mesa does this; why?
+ /*
+ * There should be no need to set __glXLastContext to NULL here, because
+ * glxcmds.c does it as part of the context cache flush after calling
+ * this.
+ */
return GL_TRUE;
}