* clutter/clutter-texture.c:

* clutter/clutter-rectangle.c: 
	* clutter/clutter-group.c: 
	* clutter/clutter-entry.c: 
	* clutter/clutter-clone-texture.c: Remove unnecessary calls to
	cogl_{push,pop}_matrix. The matrix is preserved in
	clutter_actor_paint whenever the actor's transformation is applied
	so there should be no need to push the matrix in actor paint
	implementations unless it does some additional transformations
	itself.
This commit is contained in:
Neil Roberts 2008-07-17 10:08:52 +00:00
parent e1cc4d8e93
commit e33cce309a
6 changed files with 13 additions and 20 deletions

View File

@ -1,3 +1,16 @@
2008-07-17 Neil Roberts <neil@o-hand.com>
* clutter/clutter-texture.c:
* clutter/clutter-rectangle.c:
* clutter/clutter-group.c:
* clutter/clutter-entry.c:
* clutter/clutter-clone-texture.c: Remove unnecessary calls to
cogl_{push,pop}_matrix. The matrix is preserved in
clutter_actor_paint whenever the actor's transformation is applied
so there should be no need to push the matrix in actor paint
implementations unless it does some additional transformations
itself.
2008-07-16 Emmanuele Bassi <ebassi@openedhand.com> 2008-07-16 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.pc.in: Add a variable containing the COGL backend * clutter.pc.in: Add a variable containing the COGL backend

View File

@ -165,8 +165,6 @@ clutter_clone_texture_paint (ClutterActor *self)
if (!CLUTTER_ACTOR_IS_REALIZED (parent_texture)) if (!CLUTTER_ACTOR_IS_REALIZED (parent_texture))
clutter_actor_realize (parent_texture); clutter_actor_realize (parent_texture);
cogl_push_matrix ();
col.alpha = clutter_actor_get_paint_opacity (self); col.alpha = clutter_actor_get_paint_opacity (self);
cogl_color (&col); cogl_color (&col);
@ -201,8 +199,6 @@ clutter_clone_texture_paint (ClutterActor *self)
CLUTTER_INT_TO_FIXED (x_2 - x_1), CLUTTER_INT_TO_FIXED (x_2 - x_1),
CLUTTER_INT_TO_FIXED (y_2 - y_1), CLUTTER_INT_TO_FIXED (y_2 - y_1),
0, 0, t_w, t_h); 0, 0, t_w, t_h);
cogl_pop_matrix ();
} }
static void static void

View File

@ -409,15 +409,11 @@ clutter_entry_paint_cursor (ClutterEntry *entry)
if (priv->show_cursor) if (priv->show_cursor)
{ {
cogl_push_matrix ();
cogl_color (&priv->fgcol); cogl_color (&priv->fgcol);
cogl_rectangle (priv->cursor_pos.x, cogl_rectangle (priv->cursor_pos.x,
priv->cursor_pos.y, priv->cursor_pos.y,
priv->cursor_pos.width, priv->cursor_pos.width,
priv->cursor_pos.height); priv->cursor_pos.height);
cogl_pop_matrix ();
} }
} }

View File

@ -88,8 +88,6 @@ clutter_group_paint (ClutterActor *actor)
CLUTTER_NOTE (PAINT, "ClutterGroup paint enter"); CLUTTER_NOTE (PAINT, "ClutterGroup paint enter");
cogl_push_matrix ();
for (child_item = priv->children; for (child_item = priv->children;
child_item != NULL; child_item != NULL;
child_item = child_item->next) child_item = child_item->next)
@ -102,8 +100,6 @@ clutter_group_paint (ClutterActor *actor)
clutter_actor_paint (child); clutter_actor_paint (child);
} }
cogl_pop_matrix ();
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave"); CLUTTER_NOTE (PAINT, "ClutterGroup paint leave");
} }

View File

@ -82,8 +82,6 @@ clutter_rectangle_paint (ClutterActor *self)
"painting rect '%s'", "painting rect '%s'",
clutter_actor_get_name (self) ? clutter_actor_get_name (self) clutter_actor_get_name (self) ? clutter_actor_get_name (self)
: "unknown"); : "unknown");
cogl_push_matrix();
clutter_actor_get_allocation_geometry (self, &geom); clutter_actor_get_allocation_geometry (self, &geom);
/* parent paint call will have translated us into position so /* parent paint call will have translated us into position so
@ -144,8 +142,6 @@ clutter_rectangle_paint (ClutterActor *self)
cogl_rectangle (0, 0, geom.width, geom.height); cogl_rectangle (0, 0, geom.width, geom.height);
} }
cogl_pop_matrix();
} }
static void static void

View File

@ -480,8 +480,6 @@ clutter_texture_paint (ClutterActor *self)
"painting texture '%s'", "painting texture '%s'",
clutter_actor_get_name (self) ? clutter_actor_get_name (self) clutter_actor_get_name (self) ? clutter_actor_get_name (self)
: "unknown"); : "unknown");
cogl_push_matrix ();
col.alpha = clutter_actor_get_paint_opacity (self); col.alpha = clutter_actor_get_paint_opacity (self);
cogl_color (&col); cogl_color (&col);
@ -508,8 +506,6 @@ clutter_texture_paint (ClutterActor *self)
CLUTTER_INT_TO_FIXED (x_2 - x_1), CLUTTER_INT_TO_FIXED (x_2 - x_1),
CLUTTER_INT_TO_FIXED (y_2 - y_1), CLUTTER_INT_TO_FIXED (y_2 - y_1),
0, 0, t_w, t_h); 0, 0, t_w, t_h);
cogl_pop_matrix ();
} }
static void static void