diff options
author | Timm Bäder <mail@baedert.org> | 2017-12-30 10:01:12 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-01-02 08:10:06 +0100 |
commit | 0e57d173b39a1fb59dda4a060cc036998baf7f78 (patch) | |
tree | d2079112d8117a08aab31ddb951b65758b45e500 /gsk | |
parent | 9ef700b16138f22dfa91b68dd2d7e25794ea2dc1 (diff) | |
download | gtk+-0e57d173b39a1fb59dda4a060cc036998baf7f78.tar.gz |
gl renderer: Remove an unnecessary block
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gl/gskglrenderer.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c index 1c67ef3404..8b4f7439a2 100644 --- a/gsk/gl/gskglrenderer.c +++ b/gsk/gl/gskglrenderer.c @@ -385,10 +385,8 @@ render_text_node (GskGLRenderer *self, /* e.g. whitespace */ if (glyph->draw_width <= 0 || glyph->draw_height <= 0) - { - x_position += gi->geometry.width; - continue; - } + goto next; + cx = (double)(x_position + gi->geometry.x_offset) / PANGO_SCALE; cy = (double)(gi->geometry.y_offset) / PANGO_SCALE; @@ -405,20 +403,17 @@ render_text_node (GskGLRenderer *self, glyph_w = glyph->draw_width; glyph_h = glyph->draw_height; - { - const GskQuadVertex vertex_data[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_w, glyph_y + glyph_h }, { tx2, ty2 }, }, - { { glyph_x, glyph_y + glyph_h }, { tx, ty2 }, }, - { { glyph_x + glyph_w, glyph_y }, { tx2, ty }, }, - }; + 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 }, }, - ops_draw (builder, vertex_data); - } + { { 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 }, }, + }); +next: x_position += gi->geometry.width; } } |