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
This commit is contained in:
parent
48b0a91385
commit
e5b7462b94
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user