This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch textgrid-render-perf
in repository efl.

View the commit online.

commit ec2c5ae8269758c167deb92525621fe02cb277be
Author: Cedric BAIL <[email protected]>
AuthorDate: Sun Nov 22 14:48:05 2026 -0600

    evas/gl: keep the program of unmasked glyphs between pushes
    
    Every glyph looked the text shader up in the program hash, although
    without a mask nothing selects it but the dither setting fixed at init.
    Remember it in the shared state, and forget it where programs can be
    deleted.
    
    Textgrid tests of expedite on the GL engine, callgrind instructions per
    frame, previous commit to this one: fire 20.8M to 19.1M (-8%), terminal
    scroll 19.7M to 18.2M (-8%), change -10%, partial -3%, one row -4%.
    fps medians: fire +3%, scroll +0.3%, partial +1%, change +6%, one row
    -4%; all within noise.  The software engine does not run this code.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/modules/evas/engines/gl_common/evas_gl_common.h  |  4 ++++
 src/modules/evas/engines/gl_common/evas_gl_context.c | 13 +++++++++----
 src/modules/evas/engines/gl_common/evas_gl_shader.c  |  2 ++
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index 43bb702a5b..1f5e81d27e 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -222,6 +222,10 @@ struct _Evas_GL_Shared
 
    Eet_File           *shaders_cache;
    Eina_Hash          *shaders_hash;
+   /* Program of glyphs drawn without a mask: what shaders_hash gives for
+    * them depends on nothing else.  NULL until the first one is drawn and
+    * whenever programs are deleted. */
+   Evas_GL_Program    *font_prog;
    Eina_Stringshare   *shaders_checksum;
 
 #ifdef GL_GLES
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c
index cad6d599b2..4b250dd6b8 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -2581,10 +2581,15 @@ evas_gl_common_context_font_push(Evas_Engine_GL_Context *gc,
    Evas_GL_Program *prog;
    int pn = 0;
 
-   prog = evas_gl_common_shader_program_get(gc, SHD_FONT, NULL, 0, r, g, b, a,
-                                            sw, sh, w, h, EINA_FALSE, tex, EINA_FALSE,
-                                            mtex, mask_smooth, mask_color, mw, mh,
-                                            EINA_FALSE, NULL, NULL, &masksam);
+   prog = mtex ? NULL : gc->shared->font_prog;
+   if (!prog)
+     {
+        prog = evas_gl_common_shader_program_get(gc, SHD_FONT, NULL, 0, r, g, b, a,
+                                                 sw, sh, w, h, EINA_FALSE, tex, EINA_FALSE,
+                                                 mtex, mask_smooth, mask_color, mw, mh,
+                                                 EINA_FALSE, NULL, NULL, &masksam);
+        if (!mtex) gc->shared->font_prog = prog;
+     }
 
    pn = _evas_gl_common_context_push(SHD_FONT,
                                      gc, tex, mtex,
diff --git a/src/modules/evas/engines/gl_common/evas_gl_shader.c b/src/modules/evas/engines/gl_common/evas_gl_shader.c
index 2896ca6332..a9b9fc3423 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_shader.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_shader.c
@@ -760,6 +760,7 @@ evas_gl_common_shaders_flush(Evas_GL_Shared *shared)
         Eina_Iterator *it;
         Evas_GL_Program *p;
 
+        shared->font_prog = NULL;
         _evas_gl_common_shader_binary_save(shared);
 
         it = eina_hash_iterator_data_new(shared->shaders_hash);
@@ -790,6 +791,7 @@ evas_gl_common_shader_program_shutdown(Evas_GL_Shared *shared)
         eet_shutdown();
      }
 
+   shared->font_prog = NULL;
    eina_hash_free(shared->shaders_hash);
    shared->shaders_hash = NULL;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to