[gtk/glyphcache-fiddling: 5/6] Cosmetics



commit e1b14851f77f61ea1935177e5139a31488ef4588
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 9 23:17:15 2019 -0400

    Cosmetics

 gsk/gl/gskglrenderer.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 6cec580d2d..7b84ae1b6c 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -589,7 +589,7 @@ render_text_node (GskGLRenderer   *self,
     {
       const PangoGlyphInfo *gi = &glyphs[i];
       const GskGLCachedGlyph *glyph;
-      float glyph_x, glyph_y, glyph_w, glyph_h;
+      float glyph_x, glyph_y, glyph_x2, glyph_y2;
       float tx, ty, tx2, ty2;
       double cx;
       double cy;
@@ -619,17 +619,17 @@ render_text_node (GskGLRenderer   *self,
 
       glyph_x = floor (x + cx + 0.125) + glyph->draw_x;
       glyph_y = floor (y + cy + 0.125) + glyph->draw_y;
-      glyph_w = glyph->draw_width;
-      glyph_h = glyph->draw_height;
+      glyph_x2 = glyph_x + glyph->draw_width;
+      glyph_y2 = glyph_y + glyph->draw_height;
 
       ops_draw (builder, (GskQuadVertex[GL_N_VERTICES]) {
-        { { glyph_x,           glyph_y           }, { tx,  ty  }, },
-        { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
-        { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },
+        { { glyph_x,  glyph_y  }, { tx,  ty  }, },
+        { { glyph_x,  glyph_y2 }, { tx,  ty2 }, },
+        { { glyph_x2, glyph_y  }, { tx2, ty  }, },
 
-        { { glyph_x + glyph_w, glyph_y + glyph_h }, { tx2, ty2 }, },
-        { { glyph_x,           glyph_y + glyph_h }, { tx,  ty2 }, },
-        { { glyph_x + glyph_w, glyph_y           }, { tx2, ty  }, },
+        { { glyph_x2, glyph_y2 }, { tx2, ty2 }, },
+        { { glyph_x,  glyph_y2 }, { tx,  ty2 }, },
+        { { glyph_x2, glyph_y  }, { tx2, ty  }, },
       });
 
 next:


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