[gtk/glyphcache-fiddling] gl: Avoid stray use of doubles



commit 9716394df42857befc2146c4ed73860f6eacc890
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 10 15:13:14 2019 -0400

    gl: Avoid stray use of doubles
    
    Everything else in this code is floats,
    so stick to that and avoid unnecessary
    precision.

 gsk/gl/gskglrenderer.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 307228cc12..2bae29126b 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -573,14 +573,14 @@ render_text_node (GskGLRenderer   *self,
       const GskGLCachedGlyph *glyph;
       float glyph_x, glyph_y, glyph_x2, glyph_y2;
       float tx, ty, tx2, ty2;
-      double cx;
-      double cy;
+      float cx;
+      float cy;
 
       if (gi->glyph == PANGO_GLYPH_EMPTY)
         continue;
 
-      cx = (double)(x_position + gi->geometry.x_offset) / PANGO_SCALE;
-      cy = (double)(gi->geometry.y_offset) / PANGO_SCALE;
+      cx = (float)(x_position + gi->geometry.x_offset) / PANGO_SCALE;
+      cy = (float)(gi->geometry.y_offset) / PANGO_SCALE;
 
       lookup.glyph_and_shift = gi->glyph | (PHASE (x + cx) << 24) | (PHASE (y + cy) << 26);
 


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