clip-state: remove redundant _cogl_clip_state_flush() api

There was only one place where we called _cogl_clip_state_flush() in
_cogl_framebuffer_flush_state() and we can just as well use
_cogl_clip_state_get_stack() and _cogl_clip_stack_flush() directly
instead.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-11-22 19:35:31 +00:00
parent 6d1bf9a0d4
commit 6ab371d587
3 changed files with 5 additions and 16 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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,