This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/10/head
in repository expedite.
View the commit online.
commit 472bc1bac0790f4beca2eaeb5d1f03b01d776162
Author: Cedric Bail <[email protected]>
AuthorDate: Sat Nov 28 15:40:47 2026 -0600
perf: add bump filter benchmarks
Font Effect Bump lights a blurred alpha buffer to bevel text, and
Image Bump embosses images, an RGBA source with its own blurred alpha
as height map. The light goes round in both.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/bin/Makefile.am | 2 +
src/bin/font_effect_bump.c | 93 +++++++++++++++++++++++++++++++++++++++++
src/bin/image_bump.c | 101 +++++++++++++++++++++++++++++++++++++++++++++
src/bin/meson.build | 2 +
src/bin/tests.h | 2 +
5 files changed, 200 insertions(+)
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 316266b..ff17afe 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -122,6 +122,8 @@ font_effect_alpha_convert.c \
font_effect_alpha_many.c \
font_effect_glow_letters.c \
font_effect_glow_color_glyphs.c \
+font_effect_bump.c \
+image_bump.c \
image_mask.c \
image_mask_2.c \
image_mask_3.c \
diff --git a/src/bin/font_effect_bump.c b/src/bin/font_effect_bump.c
new file mode 100644
index 0000000..accf61b
--- /dev/null
+++ b/src/bin/font_effect_bump.c
@@ -0,0 +1,93 @@
+#define EFL_GFX_FILTER_BETA
+
+#undef FNAME
+#undef NAME
+#undef ICON
+
+/* metadata */
+#define FNAME font_effect_bump_start
+#define NAME "Font Effect Bump"
+#define ICON "text.png"
+
+#ifndef PROTO
+# ifndef UI
+# include "main.h"
+
+#include "ui.h"
+
+/* Bevelled glossy text: a blurred alpha buffer as height map, lit by a
+ * light going round. The source is the coverage of the text. */
+
+/* standard var */
+static int done = 0;
+/* private data */
+static Evas_Object *text;
+
+/* setup */
+static void _setup(void)
+{
+ int w, h;
+
+ text = evas_object_text_add(evas);
+ evas_object_color_set(text, 0, 0, 0, 255);
+ evas_object_text_font_set(text, "Vera-Bold", 100);
+ evas_object_text_text_set(text, "Bumped Text");
+ evas_object_show(text);
+ evas_object_geometry_get(text, NULL, NULL, &w, &h);
+ evas_object_move(text, (win_w - w) / 2 - 10, (win_h - h) / 2 - 10);
+
+ done = 0;
+}
+
+/* cleanup */
+static void _cleanup(void)
+{
+ evas_object_del(text);
+}
+
+/* loop - do things */
+static void _loop(double t, int f)
+{
+ char buf[256];
+
+ snprintf(buf, sizeof(buf),
+ "padding_set({ 10 });"
+ "a = buffer({ 'alpha' });"
+ "blur({ 4, dst = a });"
+ "bump({ map = a, azimuth = %d, color = '#3399ff',"
+ " specular = 20 });",
+ (f * 6) % 360);
+ efl_gfx_filter_program_set(text, 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
diff --git a/src/bin/image_bump.c b/src/bin/image_bump.c
new file mode 100644
index 0000000..75140fd
--- /dev/null
+++ b/src/bin/image_bump.c
@@ -0,0 +1,101 @@
+#define EFL_GFX_FILTER_BETA
+
+#undef FNAME
+#undef NAME
+#undef ICON
+
+/* metadata */
+#define FNAME image_bump_start
+#define NAME "Image Bump"
+#define ICON "logo.png"
+
+#ifndef PROTO
+# ifndef UI
+# include "main.h"
+
+#include "ui.h"
+
+/* Embossed images: an RGBA source keeping its colors, with a height map
+ * made of its own blurred alpha, lit by a light going round. */
+
+/* standard var */
+static int done = 0;
+/* private data */
+#define BUMPS 8
+static Evas_Object *images[BUMPS];
+
+/* setup */
+static void _setup(void)
+{
+ int i;
+
+ for (i = 0; i < BUMPS; i++)
+ {
+ images[i] = evas_object_image_filled_add(evas);
+ evas_object_image_file_set(images[i], build_path("logo.png"), NULL);
+ evas_object_resize(images[i], 120, 160);
+ evas_object_move(images[i], (i % 4) * ((win_w - 120) / 3),
+ (i / 4) * (win_h - 160));
+ evas_object_show(images[i]);
+ }
+
+ done = 0;
+}
+
+/* cleanup */
+static void _cleanup(void)
+{
+ int i;
+
+ for (i = 0; i < BUMPS; i++) evas_object_del(images[i]);
+}
+
+/* loop - do things */
+static void _loop(double t, int f)
+{
+ char buf[256];
+ int i;
+
+ for (i = 0; i < BUMPS; i++)
+ {
+ snprintf(buf, sizeof(buf),
+ "a = buffer({ 'alpha' });"
+ "blur({ 4, dst = a });"
+ "bump({ map = a, azimuth = %d, specular = 30, depth = 10 });",
+ (f * 6 + i * 45) % 360);
+ efl_gfx_filter_program_set(images[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 BUMPS
diff --git a/src/bin/meson.build b/src/bin/meson.build
index b7e75e6..18a9640 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -116,6 +116,8 @@ expedite_sources = [ 'main.c',
'font_effect_alpha_many.c',
'font_effect_glow_letters.c',
'font_effect_glow_color_glyphs.c',
+ 'font_effect_bump.c',
+ 'image_bump.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 ea7e251..d070852 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -134,6 +134,8 @@
#include "font_effect_alpha_many.c"
#include "font_effect_glow_letters.c"
#include "font_effect_glow_color_glyphs.c"
+#include "font_effect_bump.c"
+#include "image_bump.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.