[gnome-shell] blur-effect: Don't check whether effect is enabled when painting
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] blur-effect: Don't check whether effect is enabled when painting
- Date: Fri, 27 Mar 2020 22:37:55 +0000 (UTC)
commit e5b7462b94ae054a751aada2cd3c56734659b09e
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri Mar 27 23:00:36 2020 +0100
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 2858af7f73..cd001f6b3b 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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]