From 7c50db5bf54336d0e214a061515e6803756c6358 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Tue, 13 Sep 2011 18:06:26 +0200 Subject: [PATCH] meta-window-actor: Skip unnecessary steps in pre_paint We don't have to call check_needs_pixmap, check_needs_reshape and check_needs_shadow on unredirected windows, so skip that. https://bugzilla.gnome.org/show_bug.cgi?id=658228 --- src/compositor/meta-window-actor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 2b979ba09..7660e40dd 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -2288,7 +2288,13 @@ meta_window_actor_pre_paint (MetaWindowActor *self) return; } - if (priv->received_damage && !self->priv->unredirected) + if (priv->unredirected) + { + /* Nothing to do here until/if the window gets redirected again */ + return; + } + + if (priv->received_damage) { meta_error_trap_push (display); XDamageSubtract (xdisplay, priv->damage, None, None);