cogl path: make sure marking the clip state dirty takes affect

When we trashed the contents of the stencil buffer during
_cogl_path_fill_nodes we marked the clip stack state as dirty and expected
the clip stack code would clean up our glStencilFunc state.

The problem is that we only try and update the clip state during
_cogl_journal_init (when we flush the framebuffer state) which is only
called when the journal first gets something logged in it.

To make sure the stencil state is cleaned up we now also flush the journal
so _cogl_journal_init will be called for the next logged rectangle.
This commit is contained in:
Robert Bragg 2010-01-14 18:11:57 +00:00 committed by Chris Lord
parent 286ca56d4f
commit b31f2dd4a2

View File

@ -1496,7 +1496,14 @@ _cogl_path_fill_nodes (void)
bounds_x + bounds_w, bounds_y + bounds_h); bounds_x + bounds_w, bounds_y + bounds_h);
/* The stencil buffer now contains garbage so the clip area needs to /* The stencil buffer now contains garbage so the clip area needs to
be rebuilt */ * be rebuilt.
*
* NB: We only ever try and update the clip state during
* _cogl_journal_init (when we flush the framebuffer state) which is
* only called when the journal first gets something logged in it; so
* we call cogl_flush() to emtpy the journal.
*/
cogl_flush ();
_cogl_clip_stack_state_dirty (clip_state); _cogl_clip_stack_state_dirty (clip_state);
} }
else else