From e5b7462b94ae054a751aada2cd3c56734659b09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Fri, 27 Mar 2020 23:00:36 +0100 Subject: [PATCH] blur-effect: Don't check whether effect is enabled when painting A ClutterEffect is being painted as part of the paint cycle of ClutterActor, where _clutter_effect_paint() is called before painting the actual actor. With that, it's impossible that an effect gets painted while it's disabled, so remove the check whether the ClutterActorMeta is enabled before painting. Also if everything works fine in Clutter, the ClutterActorMeta should have an actor set and we've been notified about that actor in shell_blur_effect_set_actor(), so assert that our cached actor is set when painting the effect. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1000 --- src/shell-blur-effect.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/shell-blur-effect.c b/src/shell-blur-effect.c index 2858af7f7..cd001f6b3 100644 --- a/src/shell-blur-effect.c +++ b/src/shell-blur-effect.c @@ -681,12 +681,6 @@ update_framebuffers (ShellBlurEffect *self) float height = -1; float width = -1; - if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (self))) - return FALSE; - - if (!self->actor) - return FALSE; - get_target_size (self, &width, &height); downscale_factor = calculate_downscale_factor (width, height, self->sigma); @@ -776,6 +770,8 @@ shell_blur_effect_paint (ClutterEffect *effect, ShellBlurEffect *self = SHELL_BLUR_EFFECT (effect); uint8_t paint_opacity; + g_assert (self->actor != NULL); + if (self->sigma > 0) { if (needs_repaint (self, flags))