From 0021b4aee0205057c9522a734dc1205e920d38d8 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 6 May 2010 14:15:04 +0100 Subject: [PATCH] cogl-clip-stack: Set *stencil_used_p when the stack is empty If the clip stack is empty then _cogl_clip_stack_flush exits immediately. This was missing out the assignment of *stencil_used_p at the bottom of the function. If a path is then used after the clip is cleared then it would think it needs to merge with the clip so the stencil would not be cleared correctly. --- clutter/cogl/cogl/cogl-clip-stack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-clip-stack.c b/clutter/cogl/cogl/cogl-clip-stack.c index eb2f04a76..87a216378 100644 --- a/clutter/cogl/cogl/cogl-clip-stack.c +++ b/clutter/cogl/cogl/cogl-clip-stack.c @@ -555,7 +555,10 @@ _cogl_clip_stack_flush (CoglHandle handle, /* If the stack is empty then there's nothing else to do */ if (stack->stack_top == NULL) - return; + { + *stencil_used_p = FALSE; + return; + } /* Add all of the entries. This will end up adding them in the reverse order that they were specified but as all of the clips