[cairo-commit] glitz/src/glx glitz_glx_context.c,1.4,1.5

David Reveman commit at pdx.freedesktop.org
Mon Jun 6 05:28:42 PDT 2005


Committed by: davidr

Update of /cvs/cairo/glitz/src/glx
In directory gabe:/tmp/cvs-serv28784/src/glx

Modified Files:
	glitz_glx_context.c 
Log Message:
Remove temporary context functions and fix framebuffer object issues

Index: glitz_glx_context.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glx/glitz_glx_context.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- glitz_glx_context.c	12 Apr 2005 14:54:56 -0000	1.4
+++ glitz_glx_context.c	6 Jun 2005 12:28:40 -0000	1.5
@@ -354,37 +354,35 @@
 _glitz_glx_context_update (glitz_glx_drawable_t *drawable,
                            glitz_constraint_t   constraint)
 {
-  GLXContext context;
-  
-  switch (constraint) {
-  case GLITZ_NONE:
-    break;
-  case GLITZ_ANY_CONTEXT_CURRENT: {
     glitz_glx_display_info_t *dinfo = drawable->screen_info->display_info;
+    GLXContext context = NULL;
     
-    if (dinfo->thread_info->cctx)
-    {
-      _glitz_glx_context_make_current (drawable, 0);
-    }
-    else
-    {
-      context = glXGetCurrentContext ();
-      if (context == (GLXContext) 0)
-        _glitz_glx_context_make_current (drawable, 0);
-    }
-    } break;
+    switch (constraint) {
+    case GLITZ_NONE:
+        break;
+    case GLITZ_ANY_CONTEXT_CURRENT:
+        if (!dinfo->thread_info->cctx)
+            context = glXGetCurrentContext ();
+        
+        if (context == (GLXContext) 0)
+            _glitz_glx_context_make_current (drawable, 0);
+        break;
   case GLITZ_CONTEXT_CURRENT:
-    context = glXGetCurrentContext ();
-    if (context != drawable->context->context)
-      _glitz_glx_context_make_current (drawable, (context)? 1: 0);
-    break;
-  case GLITZ_DRAWABLE_CURRENT:
-    context = glXGetCurrentContext ();
-    if ((context != drawable->context->context) ||
-        (glXGetCurrentDrawable () != drawable->drawable))
-      _glitz_glx_context_make_current (drawable, (context)? 1: 0);
-    break;
-  }
+      if (!dinfo->thread_info->cctx)
+          context = glXGetCurrentContext ();
+
+      if (context != drawable->context->context)
+          _glitz_glx_context_make_current (drawable, (context)? 1: 0);
+      break;
+    case GLITZ_DRAWABLE_CURRENT:
+        if (!dinfo->thread_info->cctx)
+            context = glXGetCurrentContext ();
+
+        if ((context != drawable->context->context) ||
+            (glXGetCurrentDrawable () != drawable->drawable))
+            _glitz_glx_context_make_current (drawable, (context)? 1: 0);
+        break;
+    }
 }
 
 void




More information about the cairo-commit mailing list