[gtk/ngl-text-tweaks: 8/8] ngl: Avoid a goto
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ngl-text-tweaks: 8/8] ngl: Avoid a goto
- Date: Tue, 30 Mar 2021 04:24:36 +0000 (UTC)
commit 668e27f95716e0d899f0f56cd83299664865f73e
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 28 20:53:46 2021 -0400
ngl: Avoid a goto
Reshuffle the code slightly, so we can use a continue
instead.
gsk/ngl/gsknglrenderjob.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index fa2c9c8cb9..5dfd78b5c8 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -2736,9 +2736,11 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
cy = ypos;
}
+ x_position += gi->geometry.width;
+
texture_id = gsk_ngl_glyph_library_lookup_or_add (library, &lookup, &glyph);
if G_UNLIKELY (texture_id == 0)
- goto next;
+ continue;
if G_UNLIKELY (last_texture != texture_id)
{
@@ -2784,9 +2786,6 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
batch->draw.vbo_count += GSK_NGL_N_VERTICES;
used++;
-
-next:
- x_position += gi->geometry.width;
}
if (used != num_glyphs)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]