summaryrefslogtreecommitdiff
path: root/src/cairo-gstate.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-01-19 23:22:31 +0100
committerAndrea Canciani <ranma42@gmail.com>2011-01-22 11:59:38 +0100
commitff9e962165905f9b3477e125de227c69aebf9510 (patch)
treee343b18a3683cfdcf2b41335f4f7b6fdbc607bcd /src/cairo-gstate.c
parent5d95ae924ed15200a17d240d8f0744c74df7c61b (diff)
downloadcairo-ff9e962165905f9b3477e125de227c69aebf9510.tar.gz
gstate: Remove unused code
_cairo_gstate_redirect_target asserts that this surface is NULL immediately before destroying it. If the code is compiled with assertions disabled and the assert would be false, it is now safer because instead of an invalid access it will only memleak. _cairo_gstate_get_parent_target () is not used anymore in cairo_pop_group () and the related code can be removed. _cairo_gstate_is_redirected () has never been used. The comment about the clipping is misleading, because the clip is translated as expected since fb7f7c2f27f0823d7702f960204d6e638d697624.
Diffstat (limited to 'src/cairo-gstate.c')
-rw-r--r--src/cairo-gstate.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 52d568c12..7298a7f25 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -303,10 +303,6 @@ _cairo_gstate_restore (cairo_gstate_t **gstate, cairo_gstate_t **freelist)
* Redirect @gstate rendering to a "child" target. The original
* "parent" target with which the gstate was created will not be
* affected. See _cairo_gstate_get_target().
- *
- * Unless the redirected target has the same device offsets as the
- * original #cairo_t target, the clip will be INVALID after this call,
- * and the caller should either recreate or reset the clip.
**/
cairo_status_t
_cairo_gstate_redirect_target (cairo_gstate_t *gstate, cairo_surface_t *child)
@@ -320,7 +316,6 @@ _cairo_gstate_redirect_target (cairo_gstate_t *gstate, cairo_surface_t *child)
/* Set up our new parent_target based on our current target;
* gstate->parent_target will take the ref that is held by gstate->target
*/
- cairo_surface_destroy (gstate->parent_target);
gstate->parent_target = gstate->target;
/* Now set up our new target; we overwrite gstate->target directly,
@@ -358,21 +353,6 @@ _cairo_gstate_is_group (cairo_gstate_t *gstate)
}
/**
- * _cairo_gstate_is_redirected
- * @gstate: a #cairo_gstate_t
- *
- * This space left intentionally blank.
- *
- * Return value: %TRUE if the gstate is redirected to a target
- * different than the original, %FALSE otherwise.
- **/
-cairo_bool_t
-_cairo_gstate_is_redirected (cairo_gstate_t *gstate)
-{
- return (gstate->target != gstate->original_target);
-}
-
-/**
* _cairo_gstate_get_target:
* @gstate: a #cairo_gstate_t
*
@@ -388,19 +368,6 @@ _cairo_gstate_get_target (cairo_gstate_t *gstate)
}
/**
- * _cairo_gstate_get_parent_target:
- * @gstate: a #cairo_gstate_t
- *
- * Return the parent surface of the current drawing target surface;
- * if this particular gstate isn't a redirect gstate, this will return %NULL.
- **/
-cairo_surface_t *
-_cairo_gstate_get_parent_target (cairo_gstate_t *gstate)
-{
- return gstate->parent_target;
-}
-
-/**
* _cairo_gstate_get_original_target:
* @gstate: a #cairo_gstate_t
*