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. With the split into surface actors, we don't have an easy place we can use to queue a redraw, and since it's unnecessary, we can just drop it on the floor. https://bugzilla.gnome.org/show_bug.cgi?id=720631
This commit is contained in:
parent
a742b17805
commit
f93fa1d705
@ -968,27 +968,6 @@ is_frozen (MetaWindowActor *self)
|
|||||||
return self->priv->freeze_count ? TRUE : FALSE;
|
return self->priv->freeze_count ? TRUE : FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_queue_create_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 (priv->actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_freeze_thaw_effect (gulong event)
|
is_freeze_thaw_effect (gulong event)
|
||||||
{
|
{
|
||||||
@ -1172,7 +1151,7 @@ meta_window_actor_detach (MetaWindowActor *self)
|
|||||||
XFreePixmap (xdisplay, priv->back_pixmap);
|
XFreePixmap (xdisplay, priv->back_pixmap);
|
||||||
priv->back_pixmap = None;
|
priv->back_pixmap = None;
|
||||||
|
|
||||||
meta_window_actor_queue_create_pixmap (self);
|
priv->needs_pixmap = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -1311,7 +1290,7 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
|
|||||||
|
|
||||||
if (priv->size_changed)
|
if (priv->size_changed)
|
||||||
{
|
{
|
||||||
meta_window_actor_queue_create_pixmap (self);
|
priv->needs_pixmap = TRUE;
|
||||||
meta_window_actor_update_shape (self);
|
meta_window_actor_update_shape (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1484,7 +1463,7 @@ meta_window_actor_new (MetaWindow *window)
|
|||||||
priv->last_width = -1;
|
priv->last_width = -1;
|
||||||
priv->last_height = -1;
|
priv->last_height = -1;
|
||||||
|
|
||||||
meta_window_actor_queue_create_pixmap (self);
|
priv->needs_pixmap = TRUE;
|
||||||
|
|
||||||
meta_window_actor_set_updates_frozen (self,
|
meta_window_actor_set_updates_frozen (self,
|
||||||
meta_window_updates_are_frozen (priv->window));
|
meta_window_updates_are_frozen (priv->window));
|
||||||
|
Loading…
Reference in New Issue
Block a user