diff options
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/glitz_egl_context.c | 8 | ||||
-rw-r--r-- | src/egl/glitz_egl_surface.c | 6 | ||||
-rw-r--r-- | src/egl/glitz_eglint.h | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/egl/glitz_egl_context.c b/src/egl/glitz_egl_context.c index 9ccb557..407b068 100644 --- a/src/egl/glitz_egl_context.c +++ b/src/egl/glitz_egl_context.c @@ -325,6 +325,8 @@ _glitz_egl_context_update (glitz_egl_surface_t *drawable, { EGLContext egl_context; + drawable->base.flushed = drawable->base.finished = 0; + switch (constraint) { case GLITZ_NONE: break; @@ -365,12 +367,16 @@ _glitz_egl_context_update (glitz_egl_surface_t *drawable, 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]; diff --git a/src/egl/glitz_egl_surface.c b/src/egl/glitz_egl_surface.c index 6a20688..c42e2fc 100644 --- a/src/egl/glitz_egl_surface.c +++ b/src/egl/glitz_egl_surface.c @@ -55,7 +55,7 @@ _glitz_egl_create_surface (glitz_egl_screen_info_t *screen_info, 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 @@ glitz_egl_destroy (void *abstract_drawable) * 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); } diff --git a/src/egl/glitz_eglint.h b/src/egl/glitz_eglint.h index 9ed052f..f58ea0a 100644 --- a/src/egl/glitz_eglint.h +++ b/src/egl/glitz_eglint.h @@ -143,7 +143,8 @@ glitz_egl_create_pbuffer (void *abstract_templ, 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); |