[librsvg/rustification] Remove superfluous cairo_save()/cairo_restore()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] Remove superfluous cairo_save()/cairo_restore()
- Date: Fri, 2 Dec 2016 16:59:53 +0000 (UTC)
commit d29eb93a79a3b6787e61d5db4a7dd422c70f1de5
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Dec 2 10:24:24 2016 -0600
Remove superfluous cairo_save()/cairo_restore()
We create a new cairo_t explicitly for get_foo_sub() and destroy
it when we are done; there is no need to keep the cairo_t pristine for
another place.
rsvg-base.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/rsvg-base.c b/rsvg-base.c
index 439f438..625b9b8 100644
--- a/rsvg-base.c
+++ b/rsvg-base.c
@@ -1580,12 +1580,10 @@ rsvg_handle_get_dimensions_sub (RsvgHandle * handle, RsvgDimensionData * dimensi
}
rsvg_state_push (draw);
- cairo_save (cr);
rsvg_node_draw (handle->priv->treebase, draw, 0);
bbox = RSVG_CAIRO_RENDER (draw->render)->bbox;
- cairo_restore (cr);
rsvg_state_pop (draw);
rsvg_drawing_ctx_free (draw);
cairo_destroy (cr);
@@ -1677,12 +1675,10 @@ rsvg_handle_get_position_sub (RsvgHandle * handle, RsvgPositionData * position_d
}
rsvg_state_push (draw);
- cairo_save (cr);
rsvg_node_draw (handle->priv->treebase, draw, 0);
bbox = RSVG_CAIRO_RENDER (draw->render)->bbox;
- cairo_restore (cr);
rsvg_state_pop (draw);
rsvg_drawing_ctx_free (draw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]