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



commit c0a8d5c84b5f9db58feb2e35225f954a8ca22cc6
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]