void cogl_clip_pop (void) { CoglFramebuffer *framebuffer; CoglClipState *clip_state; _COGL_GET_CONTEXT (ctx, NO_RETVAL); framebuffer = _cogl_get_draw_buffer (); clip_state = _cogl_framebuffer_get_clip_state (framebuffer); _cogl_clip_pop_real (clip_state); }
static void _cogl_clip_stack_restore_real (CoglClipStackState *clip_state) { CoglClipStack *stack; g_return_if_fail (clip_state->stacks != NULL); /* We don't log clip stack changes in the journal so we must flush * it before making modifications */ _cogl_journal_flush (); stack = clip_state->stacks->data; /* Empty the current stack */ while (stack->stack_top) _cogl_clip_pop_real (clip_state); /* Revert to an old stack */ g_slice_free (CoglClipStack, stack); clip_state->stacks = g_slist_delete_link (clip_state->stacks, clip_state->stacks); clip_state->stack_dirty = TRUE; }