[gtk+/wip/baedert/gl: 23/25] gl renderer: Remove an unnecessary block
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 23/25] gl renderer: Remove an unnecessary block
- Date: Sun, 31 Dec 2017 14:26:46 +0000 (UTC)
commit aa03299c16250526e1b69929cd782a4875c50839
Author: Timm Bäder <mail baedert org>
Date: Sat Dec 30 10:01:12 2017 +0100
gl renderer: Remove an unnecessary block
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 548aebf..6025c88 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]