From eefed95fa75e81fa119f4fffca2d5cf71b8868c6 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Thu, 7 Jan 2021 15:09:55 +0800 Subject: [PATCH] st/private: Don't scale the framebuffer, only the blur pixels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just as we did before e59069c012. Callers already ensure the framebuffer is scaled so by scaling a second time in `_st_create_shadow_pipeline` we actually got resource_scaleĀ² which was visibly incorrect. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3505, https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3560 Part-of: --- src/st/st-private.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/st/st-private.c b/src/st/st-private.c index 83c0cac76..2bdcf9b4b 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -400,7 +400,7 @@ _st_create_shadow_pipeline (StShadow *shadow_spec, g_return_val_if_fail (shadow_spec != NULL, NULL); g_return_val_if_fail (src_texture != NULL, NULL); - sigma = shadow_spec->blur / 2.f; + sigma = resource_scale * shadow_spec->blur / 2.f; sampling_radius = ceilf (1.5 * sigma) * 2.0; src_width = cogl_texture_get_width (src_texture); @@ -422,7 +422,6 @@ _st_create_shadow_pipeline (StShadow *shadow_spec, cogl_framebuffer_clear4f (fb, COGL_BUFFER_BIT_COLOR, 0.f, 0.f, 0.f, 0.f); cogl_framebuffer_orthographic (fb, 0, 0, dst_width, dst_height, 0, 1.0); - cogl_framebuffer_scale (fb, resource_scale, resource_scale, 1); /* Blur */ blur_node = clutter_blur_node_new (dst_width, dst_height, sigma);