blur-effect: Only apply paint opacity to actor blur
We don't want to apply the opacity of the actor when blurring the background. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/991
This commit is contained in:
parent
f6fa08fa75
commit
ca35ae4364
@ -578,19 +578,15 @@ paint_texture (ShellBlurEffect *self,
|
|||||||
static void
|
static void
|
||||||
apply_blur (ShellBlurEffect *self,
|
apply_blur (ShellBlurEffect *self,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
FramebufferData *from)
|
FramebufferData *from,
|
||||||
|
uint8_t paint_opacity)
|
||||||
{
|
{
|
||||||
ClutterActor *actor;
|
|
||||||
BlurData *vblur;
|
BlurData *vblur;
|
||||||
BlurData *hblur;
|
BlurData *hblur;
|
||||||
guint8 paint_opacity;
|
|
||||||
|
|
||||||
vblur = &self->blur[VERTICAL];
|
vblur = &self->blur[VERTICAL];
|
||||||
hblur = &self->blur[HORIZONTAL];
|
hblur = &self->blur[HORIZONTAL];
|
||||||
|
|
||||||
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (self));
|
|
||||||
paint_opacity = clutter_actor_get_paint_opacity (actor);
|
|
||||||
|
|
||||||
/* Copy the actor contents into the vblur framebuffer */
|
/* Copy the actor contents into the vblur framebuffer */
|
||||||
cogl_pipeline_set_color4ub (from->pipeline,
|
cogl_pipeline_set_color4ub (from->pipeline,
|
||||||
paint_opacity,
|
paint_opacity,
|
||||||
@ -784,6 +780,7 @@ shell_blur_effect_paint (ClutterEffect *effect,
|
|||||||
ClutterEffectPaintFlags flags)
|
ClutterEffectPaintFlags flags)
|
||||||
{
|
{
|
||||||
ShellBlurEffect *self = SHELL_BLUR_EFFECT (effect);
|
ShellBlurEffect *self = SHELL_BLUR_EFFECT (effect);
|
||||||
|
uint8_t paint_opacity;
|
||||||
|
|
||||||
if (self->blur_radius > 0)
|
if (self->blur_radius > 0)
|
||||||
{
|
{
|
||||||
@ -798,13 +795,15 @@ shell_blur_effect_paint (ClutterEffect *effect,
|
|||||||
switch (self->mode)
|
switch (self->mode)
|
||||||
{
|
{
|
||||||
case SHELL_BLUR_MODE_ACTOR:
|
case SHELL_BLUR_MODE_ACTOR:
|
||||||
|
paint_opacity = clutter_actor_get_paint_opacity (self->actor);
|
||||||
|
|
||||||
paint_actor_offscreen (self, paint_context, flags);
|
paint_actor_offscreen (self, paint_context, flags);
|
||||||
apply_blur (self, paint_context, &self->actor_fb);
|
apply_blur (self, paint_context, &self->actor_fb, paint_opacity);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHELL_BLUR_MODE_BACKGROUND:
|
case SHELL_BLUR_MODE_BACKGROUND:
|
||||||
paint_background (self, paint_context);
|
paint_background (self, paint_context);
|
||||||
apply_blur (self, paint_context, &self->background_fb);
|
apply_blur (self, paint_context, &self->background_fb, 255);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user