Commit Graph

2 Commits

Author SHA1 Message Date
Neil Roberts
30c4678ff4 cogl: Implement retained clip stacks
This adds three new internal API functions which can be used to retain
the clip stack state and restore it later:

 _cogl_get_clip_stack
 _cogl_set_clip_stack
 _cogl_clip_stack_copy

The functions are currently internal and not yet used but we may want
to make them public in future to replace the cogl_clip_stack_save()
and cogl_clip_stack_restore() APIs.

The get function just returns the handle to the clip stack at the top
of the stack of stacks and the set function just replaces it.

The copy function makes a cheap copy of an existing stack by taking a
reference to the top stack entry. This ends up working like a deep
copy because there is no way to modify entries of a stack but it
doesn't actually copy the data.
2010-04-15 14:51:01 +01:00
Neil Roberts
f6f375cb36 Separate out CoglClipStackState from cogl-clip-stack.c
CoglClipStackState has now been renamed to CoglClipState and is moved
to a separate file. CoglClipStack now just maintains a stack and
doesn't worry about the rest of the state. CoglClipStack sill contains
the code to flush the stack to GL.
2010-04-15 14:51:00 +01:00