[cairo-commit] goocanvas/src Makefile.am, 1.14, 1.15 goocanvasitemsimple.c, 1.31, 1.32

Damon Chaplin commit at pdx.freedesktop.org
Wed Apr 25 04:08:35 PDT 2007


Committed by: damon

Update of /cvs/cairo/goocanvas/src
In directory kemper:/tmp/cvs-serv5405/src

Modified Files:
	Makefile.am goocanvasitemsimple.c 
Log Message:
2007-04-25  Damon Chaplin  <damon at gnome.org>

	* demo/mv-scalability-demo.c: 
	* demo/scalability-demo.c: instead of connecting signals to all items
	we just use a handler on the root item. Also added a switch to turn
	off the text items, to see the difference in performance (a lot).
	Without text items we can startup with 100,000 items in 1 second
	for a simple canvas, or 4 seconds for model-view (compared to 4 seconds
	and 7 seconds with text items).

	* src/goocanvasitemsimple.c (goo_canvas_item_simple_set_model): only
	setup the accessibility stuff if accessibility is enabled (as it is
	quite slow if you have lots of items).



Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/goocanvas/src/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- Makefile.am	19 Feb 2007 11:16:15 -0000	1.14
+++ Makefile.am	25 Apr 2007 11:08:26 -0000	1.15
@@ -125,8 +125,8 @@
 
 goocanvasenumtypes.c: @REBUILD@ $(goo_canvas_public_headers) Makefile
 	(cd $(srcdir) && $(GLIB_MKENUMS) \
-		--fhead "#include <goocanvas.h>\n" \
 		--fhead "#include <glib-object.h>\n" \
+		--fhead "#include \"goocanvas.h\"\n" \
 		--fprod "\n/* Enumerations from \"@filename@\" */" \
 		--vhead "GType\n at enum_name@_get_type (void)\n{\n  static GType etype = 0;\n if( etype == 0 ) \n  {\n    static const G at Type@Value values[] = {" \
 		--vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \

Index: goocanvasitemsimple.c
===================================================================
RCS file: /cvs/cairo/goocanvas/src/goocanvasitemsimple.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- goocanvasitemsimple.c	16 Apr 2007 13:40:00 -0000	1.31
+++ goocanvasitemsimple.c	25 Apr 2007 11:08:26 -0000	1.32
@@ -82,6 +82,7 @@
   PROP_CLIP_FILL_RULE
 };
 
+static gboolean accessibility_enabled = FALSE;
 
 static void canvas_item_interface_init          (GooCanvasItemIface   *iface);
 static void goo_canvas_item_simple_dispose      (GObject              *object);
@@ -320,6 +321,7 @@
   /* Register our accessible factory, but only if accessibility is enabled. */
   if (!ATK_IS_NO_OP_OBJECT_FACTORY (atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_WIDGET)))
     {
+      accessibility_enabled = TRUE;
       atk_registry_set_factory_type (atk_get_default_registry (),
 				     GOO_TYPE_CANVAS_ITEM_SIMPLE,
 				     goo_canvas_item_accessible_factory_get_type ());
@@ -1423,7 +1425,8 @@
   item->model = g_object_ref (model);
   item->simple_data = &item->model->simple_data;
 
-  goo_canvas_item_simple_setup_accessibility (item);
+  if (accessibility_enabled)
+    goo_canvas_item_simple_setup_accessibility (item);
 
   g_signal_connect (model, "changed",
 		    G_CALLBACK (goo_canvas_item_model_simple_changed),



More information about the cairo-commit mailing list