cogl-framebuffer: Add a flag to skip flushing the clip state

This adds a flag to avoid flushing the clip state when flushing the
framebuffer state. This will be used by the journal to manage its own
clip state flushing.
This commit is contained in:
Neil Roberts 2010-11-02 17:34:51 +00:00
parent caa991d7a1
commit 6cf01ff0f4
2 changed files with 5 additions and 1 deletions

View File

@ -122,6 +122,9 @@ typedef enum _CoglFramebufferFlushFlags
* be called for framebuffer->modelview_stack, and the modelview_stack will * be called for framebuffer->modelview_stack, and the modelview_stack will
* also be marked as dirty. */ * also be marked as dirty. */
COGL_FRAMEBUFFER_FLUSH_SKIP_MODELVIEW = 1L<<0, COGL_FRAMEBUFFER_FLUSH_SKIP_MODELVIEW = 1L<<0,
/* Similarly this flag implies you are going to flush the clip state
yourself */
COGL_FRAMEBUFFER_FLUSH_SKIP_CLIP_STATE = 1L<<1
} CoglFramebufferFlushFlags; } CoglFramebufferFlushFlags;
void void

View File

@ -783,6 +783,7 @@ _cogl_framebuffer_flush_state (CoglFramebuffer *framebuffer,
/* XXX: Flushing clip state may trash the modelview and projection /* XXX: Flushing clip state may trash the modelview and projection
* matrices so we must do it before flushing the matrices... * matrices so we must do it before flushing the matrices...
*/ */
if (!(flags & COGL_FRAMEBUFFER_FLUSH_SKIP_CLIP_STATE))
_cogl_clip_state_flush (&framebuffer->clip_state); _cogl_clip_state_flush (&framebuffer->clip_state);
if (!(flags & COGL_FRAMEBUFFER_FLUSH_SKIP_MODELVIEW)) if (!(flags & COGL_FRAMEBUFFER_FLUSH_SKIP_MODELVIEW))