mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
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.
This commit is contained in:
parent
17462c21e8
commit
13ddd366a9
@ -997,27 +997,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_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
|
static gboolean
|
||||||
is_freeze_thaw_effect (gulong event)
|
is_freeze_thaw_effect (gulong event)
|
||||||
{
|
{
|
||||||
@ -1203,8 +1182,7 @@ meta_window_actor_detach_x11_pixmap (MetaWindowActor *self)
|
|||||||
|
|
||||||
XFreePixmap (xdisplay, priv->back_pixmap);
|
XFreePixmap (xdisplay, priv->back_pixmap);
|
||||||
priv->back_pixmap = None;
|
priv->back_pixmap = None;
|
||||||
|
priv->needs_pixmap = TRUE;
|
||||||
meta_window_actor_queue_create_x11_pixmap (self);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@ -1354,7 +1332,7 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
|
|||||||
{
|
{
|
||||||
if (priv->x11_size_changed)
|
if (priv->x11_size_changed)
|
||||||
{
|
{
|
||||||
meta_window_actor_queue_create_x11_pixmap (self);
|
priv->needs_pixmap = TRUE;
|
||||||
meta_window_actor_update_shape (self);
|
meta_window_actor_update_shape (self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1530,7 +1508,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_x11_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