diff --git a/cogl/cogl-clip-state-private.h b/cogl/cogl-clip-state-private.h index 799302ffd..e5e1488e0 100644 --- a/cogl/cogl-clip-state-private.h +++ b/cogl/cogl-clip-state-private.h @@ -40,10 +40,6 @@ _cogl_clip_state_init (CoglClipState *state); void _cogl_clip_state_destroy (CoglClipState *state); -void -_cogl_clip_state_flush (CoglClipState *clip_state, - CoglFramebuffer *framebuffer); - CoglClipStack * _cogl_clip_state_get_stack (CoglClipState *clip_state); diff --git a/cogl/cogl-clip-state.c b/cogl/cogl-clip-state.c index 229e6ad12..8a1013f8d 100644 --- a/cogl/cogl-clip-state.c +++ b/cogl/cogl-clip-state.c @@ -203,13 +203,3 @@ _cogl_clip_state_restore_clip_stack (CoglClipState *clip_state) clip_state->stacks = g_slist_delete_link (clip_state->stacks, clip_state->stacks); } - -void -_cogl_clip_state_flush (CoglClipState *clip_state, - CoglFramebuffer *framebuffer) -{ - /* Flush the topmost stack. The clip stack code will bail out early - if this is already flushed */ - _cogl_clip_stack_flush (clip_state->stacks->data, - framebuffer); -} diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c index a7b0e0865..c92fc747d 100644 --- a/cogl/cogl-framebuffer.c +++ b/cogl/cogl-framebuffer.c @@ -1446,8 +1446,11 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer, * matrices so we must do it before flushing the matrices... */ if (!(flags & COGL_FRAMEBUFFER_FLUSH_SKIP_CLIP_STATE)) - _cogl_clip_state_flush (&draw_buffer->clip_state, - draw_buffer); + { + CoglClipStack *stack = + _cogl_clip_state_get_stack (&draw_buffer->clip_state); + _cogl_clip_stack_flush (stack); + } if (!(flags & COGL_FRAMEBUFFER_FLUSH_SKIP_MODELVIEW)) _cogl_matrix_stack_flush_to_gl (draw_buffer->modelview_stack,