diff --git a/ChangeLog b/ChangeLog index cc1c12d94..e079a67bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-07-17 Neil Roberts + + * 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 * clutter.pc.in: Add a variable containing the COGL backend diff --git a/clutter/clutter-clone-texture.c b/clutter/clutter-clone-texture.c index bab967312..e84adde13 100644 --- a/clutter/clutter-clone-texture.c +++ b/clutter/clutter-clone-texture.c @@ -165,8 +165,6 @@ clutter_clone_texture_paint (ClutterActor *self) if (!CLUTTER_ACTOR_IS_REALIZED (parent_texture)) clutter_actor_realize (parent_texture); - cogl_push_matrix (); - col.alpha = clutter_actor_get_paint_opacity (self); 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 (y_2 - y_1), 0, 0, t_w, t_h); - - cogl_pop_matrix (); } static void diff --git a/clutter/clutter-entry.c b/clutter/clutter-entry.c index d5a70b0ed..9d0a7ef61 100644 --- a/clutter/clutter-entry.c +++ b/clutter/clutter-entry.c @@ -409,15 +409,11 @@ clutter_entry_paint_cursor (ClutterEntry *entry) if (priv->show_cursor) { - cogl_push_matrix (); - cogl_color (&priv->fgcol); cogl_rectangle (priv->cursor_pos.x, priv->cursor_pos.y, priv->cursor_pos.width, priv->cursor_pos.height); - - cogl_pop_matrix (); } } diff --git a/clutter/clutter-group.c b/clutter/clutter-group.c index 26af787bf..25eb1693e 100644 --- a/clutter/clutter-group.c +++ b/clutter/clutter-group.c @@ -88,8 +88,6 @@ clutter_group_paint (ClutterActor *actor) CLUTTER_NOTE (PAINT, "ClutterGroup paint enter"); - cogl_push_matrix (); - for (child_item = priv->children; child_item != NULL; child_item = child_item->next) @@ -102,8 +100,6 @@ clutter_group_paint (ClutterActor *actor) clutter_actor_paint (child); } - cogl_pop_matrix (); - CLUTTER_NOTE (PAINT, "ClutterGroup paint leave"); } diff --git a/clutter/clutter-rectangle.c b/clutter/clutter-rectangle.c index f7d14a92c..36ab30e20 100644 --- a/clutter/clutter-rectangle.c +++ b/clutter/clutter-rectangle.c @@ -82,8 +82,6 @@ clutter_rectangle_paint (ClutterActor *self) "painting rect '%s'", clutter_actor_get_name (self) ? clutter_actor_get_name (self) : "unknown"); - cogl_push_matrix(); - clutter_actor_get_allocation_geometry (self, &geom); /* 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_pop_matrix(); } static void diff --git a/clutter/clutter-texture.c b/clutter/clutter-texture.c index f8d2b884e..4d63d87f9 100644 --- a/clutter/clutter-texture.c +++ b/clutter/clutter-texture.c @@ -480,8 +480,6 @@ clutter_texture_paint (ClutterActor *self) "painting texture '%s'", clutter_actor_get_name (self) ? clutter_actor_get_name (self) : "unknown"); - cogl_push_matrix (); - col.alpha = clutter_actor_get_paint_opacity (self); cogl_color (&col); @@ -508,8 +506,6 @@ clutter_texture_paint (ClutterActor *self) CLUTTER_INT_TO_FIXED (x_2 - x_1), CLUTTER_INT_TO_FIXED (y_2 - y_1), 0, 0, t_w, t_h); - - cogl_pop_matrix (); } static void