2006-12-04 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-private.h: Add our own READABLE,
	WRITABLE and READWRITE paramspec flags, declaring the
	string components of the properties GParamSpec as static;
	this should shave off some bytes in the memory footprint
	and avoid relocations.

	* clutter/clutter-actor.c:
	* clutter/clutter-behaviour.c:
	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-behavuour-scale.c:
	* clutter/clutter-clone-texture.c:
	* clutter/clutter-label.c:
	* clutter/clutter-rectangle.c:
	* clutter/clutter-stage.c:
	* clutter/clutter-texture.c:
	* clutter/clutter-timeline.c: Use the CLUTTER_PARAM_*
	macros we just added.

	* clutter/clutter-behaviour-scale.c: Add properties for
	the scale begin, scale end and gravity parameters.

	* clutter/clutter-behaviour-path.h: Mark the ClutterKnot
	memory management functions as public (for the bindings),
	since we use the slice allocator for copying knots around;
	add a clutter_knot_equal() function.

	* clutter/clutter-behaviour-path.c:
	(node_distance): Use clutter_knot_equal() as a fast path
	to avoid the sqrt() in case the nodes we are using are
	at the same position.
	(path_total_length): Additional check on the existence
	of the next node.

	* examples/behave.c: Do not leak the ClutterBehaviour
	objects around.
This commit is contained in:
Emmanuele Bassi
2006-12-04 16:26:35 +00:00
parent 28d83d3c1a
commit f83ffa3520
16 changed files with 249 additions and 62 deletions

View File

@ -848,7 +848,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
g_param_spec_pointer ("pixbuf",
"Pixbuf source for Texture.",
"Pixbuf source for Texture.",
G_PARAM_READWRITE));
CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_USE_TILES,
@ -862,7 +862,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
*/
(clutter_feature_available
(CLUTTER_FEATURE_TEXTURE_RECTANGLE) == FALSE),
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT_ONLY | CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_SYNC_SIZE,
@ -871,7 +871,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
"Auto sync size of actor to underlying pixbuf"
"dimentions",
TRUE,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_REPEAT_X,
@ -880,7 +880,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
"Reapeat underlying pixbuf rather than scale"
"in x direction. Currently UNWORKING",
FALSE,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_REPEAT_Y,
@ -889,7 +889,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
"Reapeat underlying pixbuf rather than scale"
"in y direction. Currently UNWORKING",
FALSE,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
/* FIXME: Ideally this option needs to have some kind of global
* overide as to imporve performance.
@ -905,7 +905,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
0,
G_MAXINT,
1,
G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_MAX_TILE_WASTE,
@ -917,7 +917,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
0,
G_MAXINT,
64,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT_ONLY | CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_PIXEL_TYPE,
@ -927,7 +927,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
0,
G_MAXINT,
PIXEL_TYPE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT_ONLY | CLUTTER_PARAM_READWRITE));
g_object_class_install_property
(gobject_class, PROP_PIXEL_FORMAT,
@ -937,7 +937,7 @@ clutter_texture_class_init (ClutterTextureClass *klass)
0,
G_MAXINT,
GL_RGBA,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
G_PARAM_CONSTRUCT_ONLY | CLUTTER_PARAM_READWRITE));
texture_signals[SIGNAL_SIZE_CHANGE] =
g_signal_new ("size-change",