[cairo-commit] glitz/src glitz_context.c, 1.5, 1.6 glitz_drawable.c, 1.4, 1.5

David Reveman commit at pdx.freedesktop.org
Mon Feb 6 14:26:07 PST 2006


Committed by: davidr

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

Modified Files:
	glitz_context.c glitz_drawable.c 
Log Message:
Draw buffer and swap buffer fixes

Index: glitz_context.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_context.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- glitz_context.c	21 Dec 2005 16:19:51 -0000	1.5
+++ glitz_context.c	6 Feb 2006 22:26:04 -0000	1.6
@@ -212,15 +212,14 @@
 
     if (mask)
     {
-	if (mask == (FRONT_BIT | BACK_BIT))
-	    context->drawable->backend->draw_buffer (context->drawable,
-						     GLITZ_GL_FRONT_AND_BACK);
-	else if (mask == FRONT_BIT)
-	    context->drawable->backend->draw_buffer (context->drawable,
-						     GLITZ_GL_FRONT);
-	else
-	    context->drawable->backend->draw_buffer (context->drawable,
-						     GLITZ_GL_BACK);
+	static const glitz_gl_enum_t mode[] = {
+	    GLITZ_GL_FRONT,
+	    GLITZ_GL_BACK,
+	    GLITZ_GL_FRONT_AND_BACK
+	};
+
+	context->drawable->backend->draw_buffer (context->drawable,
+						 mode[mask - 1]);
     }
 
 #undef FRONT_BIT

Index: glitz_drawable.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_drawable.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- glitz_drawable.c	21 Dec 2005 16:19:51 -0000	1.4
+++ glitz_drawable.c	6 Feb 2006 22:26:04 -0000	1.5
@@ -306,7 +306,8 @@
 		box++;
 	    }
 	}
-	drawable->backend->gl->finish ();
+
+	drawable->backend->gl->flush ();
 
 	if (surface)
 	    glitz_surface_pop_current (surface);



More information about the cairo-commit mailing list