gl: Avoid stray use of doubles
authorMatthias Clasen <mclasen@redhat.com>
Thu, 10 Oct 2019 19:13:14 +0000 (15:13 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 11 Oct 2019 20:16:09 +0000 (16:16 -0400)
Everything else in this code is floats,
so stick to that and avoid unnecessary
precision.

gsk/gl/gskglrenderer.c

index 5354aca55f4c31a9611eba66bd6e020b744deb49..531e145d6226d7aaf18f72b253df622b25ac9cf6 100644 (file)
@@ -576,14 +576,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;
 
       glyph_cache_key_set_glyph_and_shift (&lookup, gi->glyph, x + cx, y + cy);