From 13ddd366a9cb2056afec32516c023a329b2815a8 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 18 Feb 2014 23:29:19 -0500 Subject: [PATCH] window-actor: Don't queue a redraw when queueing a new pixmap We guarantee ourselves that a valid pixmap will appear any time that the window is painted. The window actor will be scheduled for a repaint if it's added / removed from the scene graph, like during construction, if the size changes, or if we receive damage, which are the existing use cases where this function is called. So, I can't see any reason that we queue a redraw in here. --- src/compositor/meta-window-actor.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 9456990cb..6e5b80783 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -997,27 +997,6 @@ is_frozen (MetaWindowActor *self) return self->priv->freeze_count ? TRUE : FALSE; } -static void -meta_window_actor_queue_create_x11_pixmap (MetaWindowActor *self) -{ - MetaWindowActorPrivate *priv = self->priv; - - priv->needs_pixmap = TRUE; - - if (is_frozen (self)) - return; - - /* This will cause the compositor paint function to be run - * if the actor is visible or a clone of the actor is visible. - * if the actor isn't visible in any way, then we don't - * need to repair the window anyways, and can wait until - * the stage is redrawn for some other reason - * - * The compositor paint function repairs all windows. - */ - clutter_actor_queue_redraw (CLUTTER_ACTOR (priv->surface)); -} - static gboolean is_freeze_thaw_effect (gulong event) { @@ -1203,8 +1182,7 @@ meta_window_actor_detach_x11_pixmap (MetaWindowActor *self) XFreePixmap (xdisplay, priv->back_pixmap); priv->back_pixmap = None; - - meta_window_actor_queue_create_x11_pixmap (self); + priv->needs_pixmap = TRUE; } gboolean @@ -1354,7 +1332,7 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self, { if (priv->x11_size_changed) { - meta_window_actor_queue_create_x11_pixmap (self); + priv->needs_pixmap = TRUE; meta_window_actor_update_shape (self); } } @@ -1530,7 +1508,7 @@ meta_window_actor_new (MetaWindow *window) priv->last_width = -1; priv->last_height = -1; - meta_window_actor_queue_create_x11_pixmap (self); + priv->needs_pixmap = TRUE; meta_window_actor_set_updates_frozen (self, meta_window_updates_are_frozen (priv->window));