[cogl] clip-state: remove redundant _cogl_clip_state_flush() api
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] clip-state: remove redundant _cogl_clip_state_flush() api
- Date: Tue, 6 Dec 2011 19:01:01 +0000 (UTC)
commit 6ab371d587e22ac5807f9224cd420c43168a803f
Author: Robert Bragg <robert linux intel com>
Date: Tue Nov 22 19:35:31 2011 +0000
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>
cogl/cogl-clip-state-private.h | 4 ----
cogl/cogl-clip-state.c | 10 ----------
cogl/cogl-framebuffer.c | 7 +++++--
3 files changed, 5 insertions(+), 16 deletions(-)
---
diff --git a/cogl/cogl-clip-state-private.h b/cogl/cogl-clip-state-private.h
index 799302f..e5e1488 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 229e6ad..8a1013f 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 a7b0e08..c92fc74 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]