[gtk/wip/chergert/glproto] next: include padding for x,y coordinate



commit 49e4144a679fdbf860358c0c0598c174e9ee7e36
Author: Christian Hergert <chergert redhat com>
Date:   Mon Feb 22 12:31:53 2021 -0800

    next: include padding for x,y coordinate
    
    When we are creating a texture for an item without using an atlas, we need
    to include the padding in the packed x,y position so we get the area of the
    uploaded content, not the padding.

 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 05503717f5..2322dc4a25 100644
--- a/gsk/next/gskgltexturelibrary.c
+++ b/gsk/next/gskgltexturelibrary.c
@@ -305,8 +305,8 @@ gsk_gl_texture_library_pack (GskGLTextureLibrary *self,
       entry->area.x2 = 1.0f;
       entry->area.y2 = 1.0f;
 
-      *out_packed_x = 0;
-      *out_packed_y = 0;
+      *out_packed_x = padding;
+      *out_packed_y = padding;
     }
 
   g_hash_table_insert (self->hash_table, key, entry);


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