[cairo-commit] goocanvas/src goocanvasgroup.c, 1.23,
1.24 goocanvasitem.c, 1.30, 1.31 goocanvasitemmodel.c, 1.14,
1.15 goocanvasitemsimple.c, 1.32, 1.33
Damon Chaplin
commit at pdx.freedesktop.org
Wed Apr 25 06:24:47 PDT 2007
Committed by: damon
Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv16639/src
Modified Files:
goocanvasgroup.c goocanvasitem.c goocanvasitemmodel.c
goocanvasitemsimple.c
Log Message:
2007-04-25 Damon Chaplin <damon at gnome.org>
* src/goocanvasitemmodel.c (_goo_canvas_item_model_emit_child_added)
(_goo_canvas_item_model_emit_changed): new simple functions to emit
signals faster (avoids signal name lookups).
* src/goocanvasitemsimple.c
(goo_canvas_item_model_simple_set_property)
(goo_canvas_item_model_simple_set_transform)
(goo_canvas_item_model_simple_set_style):
* src/goocanvasgroup.c (goo_canvas_group_model_add_child): use the
above functions for a little speedup.
Index: goocanvasgroup.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasgroup.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- goocanvasgroup.c 6 Mar 2007 13:21:26 -0000 1.23
+++ goocanvasgroup.c 25 Apr 2007 13:24:38 -0000 1.24
@@ -666,6 +666,9 @@
}
+extern void _goo_canvas_item_model_emit_child_added (GooCanvasItemModel *model,
+ gint position);
+
static void
goo_canvas_group_model_add_child (GooCanvasItemModel *model,
GooCanvasItemModel *child,
@@ -687,7 +690,7 @@
goo_canvas_item_model_set_parent (child, model);
- g_signal_emit_by_name (gmodel, "child-added", position);
+ _goo_canvas_item_model_emit_child_added (model, position);
}
Index: goocanvasitem.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitem.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- goocanvasitem.c 16 Apr 2007 14:10:44 -0000 1.30
+++ goocanvasitem.c 25 Apr 2007 13:24:38 -0000 1.31
@@ -1074,8 +1074,8 @@
GooCanvasItem *item = anim->item;
GooCanvasItemModel *model = anim->model;
GooCanvasAnimateType type = anim->type;
- GooCanvasItemIface *iface;
- GooCanvasItemModelIface *model_iface;
+ GooCanvasItemIface *iface = NULL;
+ GooCanvasItemModelIface *model_iface = NULL;
cairo_matrix_t new_matrix;
gboolean keep_source = TRUE;
gdouble scale;
Index: goocanvasitemmodel.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitemmodel.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- goocanvasitemmodel.c 8 Mar 2007 13:58:45 -0000 1.14
+++ goocanvasitemmodel.c 25 Apr 2007 13:24:38 -0000 1.15
@@ -1032,3 +1032,19 @@
return pspecs;
}
+
+
+void
+_goo_canvas_item_model_emit_child_added (GooCanvasItemModel *model,
+ gint position)
+{
+ g_signal_emit (model, item_model_signals[CHILD_ADDED], 0, position);
+}
+
+
+void
+_goo_canvas_item_model_emit_changed (GooCanvasItemModel *model,
+ gboolean recompute_bounds)
+{
+ g_signal_emit (model, item_model_signals[CHANGED], 0, recompute_bounds);
+}
Index: goocanvasitemsimple.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitemsimple.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- goocanvasitemsimple.c 25 Apr 2007 11:08:26 -0000 1.32
+++ goocanvasitemsimple.c 25 Apr 2007 13:24:38 -0000 1.33
@@ -1850,6 +1850,9 @@
}
+extern void _goo_canvas_item_model_emit_changed (GooCanvasItemModel *model,
+ gboolean recompute_bounds);
+
static void
goo_canvas_item_model_simple_set_property (GObject *object,
guint prop_id,
@@ -1888,7 +1891,7 @@
prop_id,
value,
pspec);
- g_signal_emit_by_name (smodel, "changed", recompute_bounds);
+ _goo_canvas_item_model_emit_changed (model, recompute_bounds);
break;
}
}
@@ -1946,7 +1949,7 @@
simple_data->transform = NULL;
}
- g_signal_emit_by_name (smodel, "changed", TRUE);
+ _goo_canvas_item_model_emit_changed (model, TRUE);
}
@@ -1980,7 +1983,7 @@
simple_data->own_style = FALSE;
}
- g_signal_emit_by_name (smodel, "changed", TRUE);
+ _goo_canvas_item_model_emit_changed (model, TRUE);
}
More information about the cairo-commit
mailing list