[gtk/wip/matthiasc/shared-glyph-cache: 33/41] glyph cache: Reinstate 1 pixel padding



commit 2529385fe40619a24a456f8d2fc3874535ea3cbd
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 2 16:02:31 2019 +0000

    glyph cache: Reinstate 1 pixel padding
    
    This is necessary to prevent bleeding.

 gsk/gl/gskglglyphcache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gl/gskglglyphcache.c b/gsk/gl/gskglglyphcache.c
index b360dccca7..0f39df607b 100644
--- a/gsk/gl/gskglglyphcache.c
+++ b/gsk/gl/gskglglyphcache.c
@@ -168,8 +168,8 @@ add_to_cache (GskGLGlyphCache  *cache,
       g_assert (was_packed);
     }
 
-  value->tx = (float)packed_x / atlas->width;
-  value->ty = (float)packed_y / atlas->height;
+  value->tx = (float)(packed_x + 1) / atlas->width;
+  value->ty = (float)(packed_y + 1) / atlas->height;
   value->tw = (float)width    / atlas->width;
   value->th = (float)height   / atlas->height;
   value->used = TRUE;


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