From: Matthias Clasen Date: Thu, 10 Oct 2019 19:13:14 +0000 (-0400) Subject: gl: Avoid stray use of doubles X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~739 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cf44ba7847d33436cd4a291642faf5be997678e2;p=gtk4.git gl: Avoid stray use of doubles Everything else in this code is floats, so stick to that and avoid unnecessary precision. --- diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index 5354aca55f..531e145d62 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -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);