From 5d4a804c90ef824f7edc76d460cd4dd495b5df15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 26 Oct 2017 11:15:46 +0200 Subject: [PATCH] st-shadow: Ceil size before comparing with texture A fractional resource scale would mean we never use the fast path for creating the shadow, because we'd cast the int to a float before comparing, which would never match. Instead compare the expected texture size with the source texture, to actually potentially trigger the fast path. https://bugzilla.gnome.org/show_bug.cgi?id=765011 --- src/st/st-private.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/st/st-private.c b/src/st/st-private.c index c9bcf4c3a..688b17b78 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -444,8 +444,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec, if (!clutter_actor_get_resource_scale (actor, &resource_scale)) return NULL; - width *= resource_scale; - height *= resource_scale; + width = ceilf (width * resource_scale); + height = ceilf (height * resource_scale); image = clutter_actor_get_content (actor); if (image && CLUTTER_IS_IMAGE (image))