[gtk/ngl-less-shaders: 13/13] ngl: Small cleanup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ngl-less-shaders: 13/13] ngl: Small cleanup
- Date: Sun, 14 Mar 2021 16:35:59 +0000 (UTC)
commit 9410748975e08a0a51225d79f8a7d3e2b1eb0dd1
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 13 23:58:19 2021 -0500
ngl: Small cleanup
We don't need to have an extra program variable
in the visit_text_node function.
gsk/ngl/gsknglrenderjob.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index fc654dfb8b..7a355b94fd 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -2782,7 +2782,6 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
GskNglCommandBatch *batch;
int x_position = 0;
GskNglGlyphKey lookup;
- GskNglProgram *program;
guint last_texture = 0;
GskNglDrawVertex *vertices;
guint used = 0;
@@ -2791,8 +2790,6 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
if (num_glyphs == 0)
return;
- program = CHOOSE_PROGRAM (job, coloring);
-
/* If the font has color glyphs, we don't need to recolor anything.
* We tell the shader by setting the color to vec4(-1).
*/
@@ -2804,7 +2801,7 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
lookup.font = (PangoFont *)font;
lookup.scale = (guint) (text_scale * 1024);
- gsk_ngl_render_job_begin_draw (job, program);
+ gsk_ngl_render_job_begin_draw (job, CHOOSE_PROGRAM (coloring));
batch = gsk_ngl_command_queue_get_batch (job->command_queue);
vertices = gsk_ngl_command_queue_add_n_vertices (job->command_queue, num_glyphs);
@@ -2852,7 +2849,7 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
batch->draw.vbo_offset = vbo_offset;
}
- gsk_ngl_program_set_uniform_texture (program,
+ gsk_ngl_program_set_uniform_texture (job->current_program,
UNIFORM_SHARED_SOURCE, 0,
GL_TEXTURE_2D,
GL_TEXTURE0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]