[gtk+/wip/baedert/gl: 29/37] gl renderer: Only check for color glyphs once per text node
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 29/37] gl renderer: Only check for color glyphs once per text node
- Date: Fri, 24 Nov 2017 09:48:13 +0000 (UTC)
commit 7d4c0257f301f28b7bbb728bd87105a26f662d28
Author: Timm Bäder <mail baedert org>
Date: Thu Nov 23 10:10:43 2017 +0100
gl renderer: Only check for color glyphs once per text node
It does not depend on the glyph, so no need to do it once for every
glyph.
gsk/gl/gskglrenderer.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 1ce04ae..3d4c0f4 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -899,6 +899,7 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self,
{
const PangoFont *font = gsk_text_node_peek_font (node);
const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node);
+ const gboolean has_color_glyphs = font_has_color_glyphs (font);
guint num_glyphs = gsk_text_node_get_num_glyphs (node);
int i;
int x_position = 0;
@@ -936,7 +937,7 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self,
cy = (double)(gi->geometry.y_offset) / PANGO_SCALE;
/* If the font has color glyphs, we don't need to recolor anything */
- if (font_has_color_glyphs (font))
+ if (has_color_glyphs)
{
ops_set_program (builder, &self->blit_program);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]