diff options
author | Neil Roberts <neil@linux.intel.com> | 2010-04-15 10:27:43 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2010-04-15 14:51:01 +0100 |
commit | 84b87e811e0152dfd6a55930c62d1211f808b8e1 (patch) | |
tree | 47c5cf3a95fd60656554049c9fb2e97e8dc4ff6b /cogl/cogl-clip-state.c | |
parent | f6f375cb369266b34a5c766b6d964356981dd852 (diff) | |
download | cogl-84b87e811e0152dfd6a55930c62d1211f808b8e1.tar.gz |
cogl-clip-stack: Convert to be a CoglHandle
CoglClipStacks can now be reference counted via a CoglHandle. The
ClipClipState now stores handles in the list rather than CoglClipStack
pointers.
Diffstat (limited to 'cogl/cogl-clip-state.c')
-rw-r--r-- | cogl/cogl-clip-state.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cogl/cogl-clip-state.c b/cogl/cogl-clip-state.c index c5b7442a..289ff6ba 100644 --- a/cogl/cogl-clip-state.c +++ b/cogl/cogl-clip-state.c @@ -47,7 +47,7 @@ cogl_clip_push_window_rectangle (int x_offset, { CoglHandle framebuffer; CoglClipState *clip_state; - CoglClipStack *stack; + CoglHandle stack; _COGL_GET_CONTEXT (ctx, NO_RETVAL); @@ -174,7 +174,7 @@ cogl_clip_push_rectangle (float x_1, { CoglHandle framebuffer; CoglClipState *clip_state; - CoglClipStack *stack; + CoglHandle stack; CoglMatrix modelview_matrix; _COGL_GET_CONTEXT (ctx, NO_RETVAL); @@ -219,7 +219,7 @@ cogl_clip_push_from_path_preserve (void) { CoglHandle framebuffer; CoglClipState *clip_state; - CoglClipStack *stack; + CoglHandle stack; CoglMatrix modelview_matrix; _COGL_GET_CONTEXT (ctx, NO_RETVAL); @@ -252,7 +252,7 @@ cogl_clip_push_from_path (void) static void _cogl_clip_pop_real (CoglClipState *clip_state) { - CoglClipStack *stack; + CoglHandle stack; /* We don't log clip stack changes in the journal so we must flush * it before making modifications */ @@ -282,7 +282,7 @@ cogl_clip_pop (void) void _cogl_clip_state_flush (CoglClipState *clip_state) { - CoglClipStack *stack; + CoglHandle stack; if (!clip_state->stack_dirty) return; @@ -316,7 +316,7 @@ cogl_clip_ensure (void) static void _cogl_clip_stack_save_real (CoglClipState *clip_state) { - CoglClipStack *stack; + CoglHandle stack; /* We don't log clip stack changes in the journal so we must flush * it before making modifications */ @@ -345,7 +345,7 @@ cogl_clip_stack_save (void) static void _cogl_clip_stack_restore_real (CoglClipState *clip_state) { - CoglClipStack *stack; + CoglHandle stack; g_return_if_fail (clip_state->stacks != NULL); @@ -355,7 +355,7 @@ _cogl_clip_stack_restore_real (CoglClipState *clip_state) stack = clip_state->stacks->data; - _cogl_clip_stack_free (stack); + cogl_handle_unref (stack); /* Revert to an old stack */ clip_state->stacks = g_slist_delete_link (clip_state->stacks, |