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

git pushed a commit to branch perf/filter-alpha-buffer-tests
in repository expedite.

View the commit online.

commit 4e92a26bafc896b56799fe0f65e5c3c30bad0187
Author: Cedric Bail <[email protected]>
AuthorDate: Sat Nov 28 13:34:48 2026 -0600

    perf: add filtered color glyph tests
    
    Evas gives a filtered text with color glyphs an RGBA input buffer
    instead of an alpha one. Two tests run the same animated glow and drop
    shadow on plain letters and on letters followed by color glyphs, to
    compare the cost of the two and their rendering between engines.
    
    color-glyphs.ttf is the color font of the Evas tests, made by
    generate_color_test_font.py there, so that the result does not depend
    on the emoji font installed.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 data/Makefile.am                        |   1 +
 data/color-glyphs.ttf                   | Bin 0 -> 868 bytes
 data/meson.build                        |   1 +
 src/bin/Makefile.am                     |   2 +
 src/bin/font_effect_glow_color_glyphs.c | 108 ++++++++++++++++++++++++++++++++
 src/bin/font_effect_glow_letters.c      | 108 ++++++++++++++++++++++++++++++++
 src/bin/meson.build                     |   2 +
 src/bin/tests.h                         |   2 +
 8 files changed, 224 insertions(+)

diff --git a/data/Makefile.am b/data/Makefile.am
index 3a7182f..033beb0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -2,6 +2,7 @@ MAINTAINERCLEANFILES = Makefile.in
 filesdir = $(datadir)/expedite/data
 files_DATA = \
 Kochi.ttf \
+color-glyphs.ttf \
 Vera.ttf \
 VeraBI.ttf \
 VeraBd.ttf \
diff --git a/data/color-glyphs.ttf b/data/color-glyphs.ttf
new file mode 100644
index 0000000..221dc4b
Binary files /dev/null and b/data/color-glyphs.ttf differ
diff --git a/data/meson.build b/data/meson.build
index 8c0f66d..2caab3d 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,4 +1,5 @@
 files = [ 'Kochi.ttf',
+	'color-glyphs.ttf',
 	'Vera.ttf',
 	'VeraBI.ttf',
 	'VeraBd.ttf',
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 6338541..316266b 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -120,6 +120,8 @@ font_effect_alpha_write.c \
 font_effect_alpha_glow.c \
 font_effect_alpha_convert.c \
 font_effect_alpha_many.c \
+font_effect_glow_letters.c \
+font_effect_glow_color_glyphs.c \
 image_mask.c \
 image_mask_2.c \
 image_mask_3.c \
diff --git a/src/bin/font_effect_glow_color_glyphs.c b/src/bin/font_effect_glow_color_glyphs.c
new file mode 100644
index 0000000..a0506bd
--- /dev/null
+++ b/src/bin/font_effect_glow_color_glyphs.c
@@ -0,0 +1,108 @@
+#define EFL_GFX_FILTER_BETA
+
+#undef FNAME
+#undef NAME
+#undef ICON
+
+/* metadata */
+#define FNAME font_effect_glow_color_glyphs_start
+#define NAME "Font Effect Glow Color Glyphs"
+#define ICON "text.png"
+
+#ifndef PROTO
+# ifndef UI
+#  include "main.h"
+
+#include "ui.h"
+
+/* The same as Font Effect Glow Letters with color glyphs in the text, whose
+ * filter input then is an RGBA buffer. */
+
+/* standard var */
+static int done = 0;
+/* private data */
+#define GLOW_TEXTS 6
+static Evas_Object *texts[GLOW_TEXTS];
+
+/* setup */
+static void _setup(void)
+{
+   char font[4200];
+   int i, w, h;
+
+   /* the second font only provides U+F0000, a color glyph */
+   snprintf(font, sizeof(font), "Vera-Bold,%s", build_path("color-glyphs.ttf"));
+   for (i = 0; i < GLOW_TEXTS; i++)
+     {
+        texts[i] = evas_object_text_add(evas);
+        evas_object_color_set(texts[i], 0, 0, 0, 255);
+        evas_object_text_font_set(texts[i], font, 48);
+        evas_object_text_text_set(texts[i], "Glow \xf3\xb0\x80\x80\xf3\xb0\x80\x80\xf3\xb0\x80\x80");
+        evas_object_show(texts[i]);
+        evas_object_geometry_get(texts[i], NULL, NULL, &w, &h);
+        evas_object_move(texts[i], (i % 2) * (win_w - w - 32),
+                         (i / 2) * ((win_h - h - 32) / 2));
+     }
+   done = 0;
+}
+
+/* cleanup */
+static void _cleanup(void)
+{
+   int i;
+
+   for (i = 0; i < GLOW_TEXTS; i++) evas_object_del(texts[i]);
+}
+
+/* loop - do things */
+static void _loop(double t, int f)
+{
+   char buf[512];
+   int i;
+
+   for (i = 0; i < GLOW_TEXTS; i++)
+     {
+        snprintf(buf, sizeof(buf),
+                 "padding_set({ 24 });"
+                 "a = buffer({ 'alpha' });"
+                 "blur({ %d, dst = a });"
+                 "blend({ a, color = 'darkblue' });"
+                 "blur({ 3, ox = 4, oy = 4, color = '#0008' });"
+                 "blend({ });",
+                 4 + ((f + i * 3) % 16));
+        efl_gfx_filter_program_set(texts[i], buf, "test");
+     }
+
+   FPS_STD(NAME);
+}
+
+/* prepend special key handlers if interactive (before STD) */
+static void _key(const char *key)
+{
+   KEY_STD;
+}
+
+/* template stuff - ignore */
+# endif
+#endif
+
+#ifdef UI
+_ui_menu_item_add(ICON, NAME, FNAME);
+#endif
+
+#ifdef PROTO
+void FNAME(void);
+#endif
+
+#ifndef PROTO
+# ifndef UI
+void FNAME(void)
+{
+   ui_func_set(_key, _loop, _setup);
+}
+# endif
+#endif
+#undef FNAME
+#undef NAME
+#undef ICON
+#undef GLOW_TEXTS
diff --git a/src/bin/font_effect_glow_letters.c b/src/bin/font_effect_glow_letters.c
new file mode 100644
index 0000000..0961d78
--- /dev/null
+++ b/src/bin/font_effect_glow_letters.c
@@ -0,0 +1,108 @@
+#define EFL_GFX_FILTER_BETA
+
+#undef FNAME
+#undef NAME
+#undef ICON
+
+/* metadata */
+#define FNAME font_effect_glow_letters_start
+#define NAME "Font Effect Glow Letters"
+#define ICON "text.png"
+
+#ifndef PROTO
+# ifndef UI
+#  include "main.h"
+
+#include "ui.h"
+
+/* Glow and drop shadow under plain text, whose filter input is an alpha
+ * buffer. Compare with Font Effect Glow Color Glyphs. */
+
+/* standard var */
+static int done = 0;
+/* private data */
+#define GLOW_TEXTS 6
+static Evas_Object *texts[GLOW_TEXTS];
+
+/* setup */
+static void _setup(void)
+{
+   char font[4200];
+   int i, w, h;
+
+   /* the second font only provides U+F0000, a color glyph */
+   snprintf(font, sizeof(font), "Vera-Bold,%s", build_path("color-glyphs.ttf"));
+   for (i = 0; i < GLOW_TEXTS; i++)
+     {
+        texts[i] = evas_object_text_add(evas);
+        evas_object_color_set(texts[i], 0, 0, 0, 255);
+        evas_object_text_font_set(texts[i], font, 48);
+        evas_object_text_text_set(texts[i], "Glow AbCd");
+        evas_object_show(texts[i]);
+        evas_object_geometry_get(texts[i], NULL, NULL, &w, &h);
+        evas_object_move(texts[i], (i % 2) * (win_w - w - 32),
+                         (i / 2) * ((win_h - h - 32) / 2));
+     }
+   done = 0;
+}
+
+/* cleanup */
+static void _cleanup(void)
+{
+   int i;
+
+   for (i = 0; i < GLOW_TEXTS; i++) evas_object_del(texts[i]);
+}
+
+/* loop - do things */
+static void _loop(double t, int f)
+{
+   char buf[512];
+   int i;
+
+   for (i = 0; i < GLOW_TEXTS; i++)
+     {
+        snprintf(buf, sizeof(buf),
+                 "padding_set({ 24 });"
+                 "a = buffer({ 'alpha' });"
+                 "blur({ %d, dst = a });"
+                 "blend({ a, color = 'darkblue' });"
+                 "blur({ 3, ox = 4, oy = 4, color = '#0008' });"
+                 "blend({ });",
+                 4 + ((f + i * 3) % 16));
+        efl_gfx_filter_program_set(texts[i], buf, "test");
+     }
+
+   FPS_STD(NAME);
+}
+
+/* prepend special key handlers if interactive (before STD) */
+static void _key(const char *key)
+{
+   KEY_STD;
+}
+
+/* template stuff - ignore */
+# endif
+#endif
+
+#ifdef UI
+_ui_menu_item_add(ICON, NAME, FNAME);
+#endif
+
+#ifdef PROTO
+void FNAME(void);
+#endif
+
+#ifndef PROTO
+# ifndef UI
+void FNAME(void)
+{
+   ui_func_set(_key, _loop, _setup);
+}
+# endif
+#endif
+#undef FNAME
+#undef NAME
+#undef ICON
+#undef GLOW_TEXTS
diff --git a/src/bin/meson.build b/src/bin/meson.build
index 4e9b93f..b7e75e6 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -114,6 +114,8 @@ expedite_sources = [ 'main.c',
 	'font_effect_alpha_glow.c',
 	'font_effect_alpha_convert.c',
 	'font_effect_alpha_many.c',
+	'font_effect_glow_letters.c',
+	'font_effect_glow_color_glyphs.c',
 	'image_mask.c',
 	'image_mask_2.c',
 	'image_mask_3.c',
diff --git a/src/bin/tests.h b/src/bin/tests.h
index 76e8a2b..ea7e251 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -132,6 +132,8 @@
 #include "font_effect_alpha_glow.c"
 #include "font_effect_alpha_convert.c"
 #include "font_effect_alpha_many.c"
+#include "font_effect_glow_letters.c"
+#include "font_effect_glow_color_glyphs.c"
 
 #if 0 // test disabled - evas having code disabled
 #include "image_mask_14.c"

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

Reply via email to