[gtk/wip/chergert/glproto: 211/493] fix width/height calculation within atlas




commit b9b9233f24b49b99e0234407c0def89f948d6dbd
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jan 20 10:23:34 2021 -0800

    fix width/height calculation within atlas

 gsk/next/gskgltexturelibrary.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/next/gskgltexturelibrary.c b/gsk/next/gskgltexturelibrary.c
index 347fcf8490..6adafb9e94 100644
--- a/gsk/next/gskgltexturelibrary.c
+++ b/gsk/next/gskgltexturelibrary.c
@@ -277,8 +277,8 @@ gsk_gl_texture_library_pack (GskGLTextureLibrary *self,
       entry->is_atlased = TRUE;
       entry->area.origin.x = (float)(packed_x + 1) / atlas->width;
       entry->area.origin.y = (float)(packed_y + 1) / atlas->height;
-      entry->area.size.width = width / atlas->width;
-      entry->area.size.height = height / atlas->height;
+      entry->area.size.width = (float)width / atlas->width;
+      entry->area.size.height = (float)height / atlas->height;
     }
   else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]