librsvg r1174 - trunk
- From: doml svn gnome org
- To: svn-commits-list gnome org
- Subject: librsvg r1174 - trunk
- Date: Tue, 26 Aug 2008 17:51:18 +0000 (UTC)
Author: doml
Date: Tue Aug 26 17:51:17 2008
New Revision: 1174
URL: http://svn.gnome.org/viewvc/librsvg?rev=1174&view=rev
Log:
2008-08-26 Dominic Lachowicz <domlachowicz gmail com>
* rsvg-private.h: #539488 - migrate use of GMemChunk to GSlice, from Felix Riemann
* rsvg-base.c: ditto
* rsvg-styles.c: ditto
* rsvg-cairo-render.c: ditto
Modified:
trunk/ChangeLog
trunk/rsvg-base.c
trunk/rsvg-cairo-render.c
trunk/rsvg-private.h
trunk/rsvg-styles.c
Modified: trunk/rsvg-base.c
==============================================================================
--- trunk/rsvg-base.c (original)
+++ trunk/rsvg-base.c Tue Aug 26 17:51:17 2008
@@ -1114,9 +1114,8 @@
static void
rsvg_state_free_func (gpointer data, gpointer user_data)
{
- RsvgDrawingCtx *ctx = (RsvgDrawingCtx *) user_data;
rsvg_state_finalize ((RsvgState *) data);
- g_mem_chunk_free (ctx->state_allocator, data);
+ g_slice_free (RsvgState, data);
}
void
@@ -1133,8 +1132,6 @@
if (handle->base_uri)
g_free (handle->base_uri);
- g_mem_chunk_destroy (handle->state_allocator);
-
if (handle->pango_context != NULL)
g_object_unref (handle->pango_context);
@@ -1313,8 +1310,6 @@
ctx->state = NULL;
- ctx->state_allocator = g_mem_chunk_create (RsvgState, 256, G_ALLOC_AND_FREE);
-
ctx->defs = handle->priv->defs;
ctx->base_uri = g_strdup (handle->priv->base_uri);
ctx->dpi_x = handle->priv->dpi_x;
Modified: trunk/rsvg-cairo-render.c
==============================================================================
--- trunk/rsvg-cairo-render.c (original)
+++ trunk/rsvg-cairo-render.c Tue Aug 26 17:51:17 2008
@@ -143,9 +143,6 @@
draw->state = NULL;
- /* should this be G_ALLOC_ONLY? */
- draw->state_allocator = g_mem_chunk_create (RsvgState, 256, G_ALLOC_AND_FREE);
-
draw->defs = handle->priv->defs;
draw->base_uri = g_strdup (handle->priv->base_uri);
draw->dpi_x = handle->priv->dpi_x;
Modified: trunk/rsvg-private.h
==============================================================================
--- trunk/rsvg-private.h (original)
+++ trunk/rsvg-private.h Tue Aug 26 17:51:17 2008
@@ -182,7 +182,6 @@
GError **error;
RsvgDefs *defs;
gchar *base_uri;
- GMemChunk *state_allocator;
PangoContext *pango_context;
double dpi_x, dpi_y;
RsvgViewBox vb;
Modified: trunk/rsvg-styles.c
==============================================================================
--- trunk/rsvg-styles.c (original)
+++ trunk/rsvg-styles.c Tue Aug 26 17:51:17 2008
@@ -1421,7 +1421,7 @@
RsvgState *baseon;
baseon = (RsvgState *) g_slist_nth_data (ctx->state, 0);
- data = g_chunk_new (RsvgState, ctx->state_allocator);
+ data = g_slice_new (RsvgState);
if (baseon) {
int i;
@@ -1443,7 +1443,7 @@
rsvg_state_finalize (dead_state);
ctx->state = g_slist_delete_link (ctx->state, link);
- g_mem_chunk_free (ctx->state_allocator, dead_state);
+ g_slice_free (RsvgState, dead_state);
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]