mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
meta-window-group: Use clutter_actor_has_effects if available
This avoids a potentially costly allocation on every pixmap update. https://bugzilla.gnome.org/show_bug.cgi?id=662225
This commit is contained in:
parent
d624e85bc1
commit
3599917123
@ -101,6 +101,25 @@ actor_is_untransformed (ClutterActor *actor,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CLUTTER_CHECK_VERSION(1, 9, 0)
|
||||||
|
#define has_effects clutter_actor_has_effects
|
||||||
|
#else
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
has_effects(ClutterActor *actor)
|
||||||
|
{
|
||||||
|
GList *list;
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
|
list = clutter_actor_get_effects (actor);
|
||||||
|
ret = list != NULL;
|
||||||
|
g_list_free (list);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_group_paint (ClutterActor *actor)
|
meta_window_group_paint (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
@ -108,7 +127,7 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
cairo_region_t *unredirected_window_region = NULL;
|
cairo_region_t *unredirected_window_region = NULL;
|
||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
cairo_rectangle_int_t visible_rect, unredirected_rect;
|
cairo_rectangle_int_t visible_rect, unredirected_rect;
|
||||||
GList *children, *l, *effects;
|
GList *children, *l;
|
||||||
|
|
||||||
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
|
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
|
MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
|
||||||
@ -161,11 +180,8 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
* as well for the same reason, but omitted for simplicity in the
|
* as well for the same reason, but omitted for simplicity in the
|
||||||
* hopes that no-one will do that.
|
* hopes that no-one will do that.
|
||||||
*/
|
*/
|
||||||
if ((effects = clutter_actor_get_effects (l->data)) != NULL)
|
if (has_effects (l->data))
|
||||||
{
|
continue;
|
||||||
g_list_free (effects);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (META_IS_WINDOW_ACTOR (l->data))
|
if (META_IS_WINDOW_ACTOR (l->data))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user