[gnome-shell] st/private: Don't scale the framebuffer, only the blur pixels
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st/private: Don't scale the framebuffer, only the blur pixels
- Date: Thu, 7 Jan 2021 12:19:20 +0000 (UTC)
commit eefed95fa75e81fa119f4fffca2d5cf71b8868c6
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Thu Jan 7 15:09:55 2021 +0800
st/private: Don't scale the framebuffer, only the blur pixels
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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1543>
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 83c0cac765..2bdcf9b4b9 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]