[gnome-shell] st-shadow: Ceil size before comparing with texture
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] st-shadow: Ceil size before comparing with texture
- Date: Fri, 1 Mar 2019 18:06:59 +0000 (UTC)
commit 5d4a804c90ef824f7edc76d460cd4dd495b5df15
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Oct 26 11:15:46 2017 +0200
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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]