[cairo-commit] glitz/src/egl glitz_egl_context.c, 1.5, 1.6 glitz_egl_surface.c, 1.5, 1.6 glitz_eglint.h, 1.4, 1.5

David Reveman commit at pdx.freedesktop.org
Mon Mar 13 06:23:46 PST 2006


Committed by: davidr

Update of /cvs/cairo/glitz/src/egl
In directory kemper:/tmp/cvs-serv20671/src/egl

Modified Files:
	glitz_egl_context.c glitz_egl_surface.c glitz_eglint.h 
Log Message:
Add support for avoiding context switches

Index: glitz_egl_context.c
===================================================================
RCS file: /cvs/cairo/glitz/src/egl/glitz_egl_context.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- glitz_egl_context.c	13 Mar 2006 13:42:46 -0000	1.5
+++ glitz_egl_context.c	13 Mar 2006 14:23:44 -0000	1.6
@@ -325,6 +325,8 @@
 {
     EGLContext egl_context;
 
+    drawable->base.flushed = drawable->base.finished = 0;
+
     switch (constraint) {
     case GLITZ_NONE:
 	break;
@@ -365,12 +367,16 @@
 glitz_bool_t
 glitz_egl_push_current (void               *abstract_drawable,
 			glitz_surface_t    *surface,
-			glitz_constraint_t constraint)
+			glitz_constraint_t constraint,
+			glitz_bool_t       *restore_state)
 {
     glitz_egl_surface_t *drawable = (glitz_egl_surface_t *) abstract_drawable;
     glitz_egl_context_info_t *context_info;
     int index;
 
+    if (restore_state)
+	*restore_state = 0;
+
     index = drawable->screen_info->context_stack_size++;
 
     context_info = &drawable->screen_info->context_stack[index];

Index: glitz_egl_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/egl/glitz_egl_surface.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- glitz_egl_surface.c	13 Mar 2006 13:42:46 -0000	1.5
+++ glitz_egl_surface.c	13 Mar 2006 14:23:44 -0000	1.6
@@ -55,7 +55,7 @@
 			  width, height);
 
     if (!context->initialized) {
-	glitz_egl_push_current (surface, NULL, GLITZ_CONTEXT_CURRENT);
+	glitz_egl_push_current (surface, NULL, GLITZ_CONTEXT_CURRENT, NULL);
 	glitz_egl_pop_current (surface);
     }
 
@@ -212,10 +212,10 @@
 	 * be our last chance to have a context current.
 	 */
 	glitz_egl_push_current (abstract_drawable, NULL,
-				GLITZ_CONTEXT_CURRENT);
+				GLITZ_CONTEXT_CURRENT, NULL);
 	glitz_program_map_fini (surface->base.backend->gl,
 				&surface->screen_info->program_map);
-        glitz_program_map_init (&surface->screen_info->program_map);
+	glitz_program_map_init (&surface->screen_info->program_map);
 	glitz_egl_pop_current (abstract_drawable);
     }
 

Index: glitz_eglint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/egl/glitz_eglint.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- glitz_eglint.h	13 Mar 2006 13:42:46 -0000	1.4
+++ glitz_eglint.h	13 Mar 2006 14:23:44 -0000	1.5
@@ -143,7 +143,8 @@
 extern glitz_bool_t __internal_linkage
 glitz_egl_push_current (void               *abstract_drawable,
 			glitz_surface_t    *surface,
-			glitz_constraint_t constraint);
+			glitz_constraint_t constraint,
+			glitz_bool_t       *restore_state);
 
 extern glitz_surface_t __internal_linkage *
 glitz_egl_pop_current (void *abstract_drawable);



More information about the cairo-commit mailing list