This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository expedite.
View the commit online.
commit ce46129a261046cf70ed16a24d483e9b5357e1e8
Author: [email protected] <[email protected]>
AuthorDate: Sat Mar 28 13:04:49 2026 -0600
test(expedite): add VG Basic Radial Gradient benchmark
Add a radial gradient VG benchmark (test 119) following the same
pattern as vg_basic_gradient.c. Uses 128 animated rounded rects
with a 3-stop radial gradient (red → green → blue), offset focal
point (+10, -5 from center), and REFLECT spread mode to exercise
the full radial gradient pipeline and measure rendering performance.
The test shapes animate using the same sine/cosine orbit pattern as
the existing VG tests, providing consistent visual and performance
comparison across the benchmark suite.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
src/bin/Makefile.am | 1 +
src/bin/meson.build | 1 +
src/bin/tests.h | 1 +
src/bin/vg_basic_radial_gradient.c | 115 +++++++++++++++++++++++++++++++++++++
4 files changed, 118 insertions(+)
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 47fab63..7949e79 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -133,6 +133,7 @@ image_mask_clipped.c \
vg_basic_rect.c \
vg_basic_circle.c \
vg_basic_gradient.c \
+vg_basic_radial_gradient.c \
vg_scaled.c \
snapshot_widgets_file_icons.c
# \
diff --git a/src/bin/meson.build b/src/bin/meson.build
index 28061eb..267ef53 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -122,6 +122,7 @@ expedite_sources = [ 'main.c',
'vg_basic_rect.c',
'vg_basic_circle.c',
'vg_basic_gradient.c',
+ 'vg_basic_radial_gradient.c',
'vg_basic_batman.c',
'vg_scaled.c',
'snapshot_widgets_file_icons.c' ]
diff --git a/src/bin/tests.h b/src/bin/tests.h
index ef54a91..817d099 100644
--- a/src/bin/tests.h
+++ b/src/bin/tests.h
@@ -115,6 +115,7 @@
#include "vg_basic_rect.c"
#include "vg_basic_circle.c"
#include "vg_basic_gradient.c"
+#include "vg_basic_radial_gradient.c"
#include "vg_basic_batman.c"
#include "vg_scaled.c"
#include "snapshot_widgets_file_icons.c"
diff --git a/src/bin/vg_basic_radial_gradient.c b/src/bin/vg_basic_radial_gradient.c
new file mode 100644
index 0000000..8ea711a
--- /dev/null
+++ b/src/bin/vg_basic_radial_gradient.c
@@ -0,0 +1,115 @@
+#undef FNAME
+#undef NAME
+#undef ICON
+
+/* metadata */
+#define FNAME vg_basic_radial_gradient_start
+#define NAME "VG Basic Radial Gradient"
+#define ICON "vector.png"
+
+#ifndef PROTO
+# ifndef UI
+# include "main.h"
+
+/* standard var */
+static int done = 0;
+
+/* private data */
+static Eo *o_shapes[OBNUM];
+
+static const Efl_Gfx_Gradient_Stop stops[3] = {
+ { 0, 255, 0, 0, 255 },
+ { 0.5, 0, 255, 0, 255 },
+ { 1, 0, 0, 255, 255 }
+};
+
+/* setup */
+static void _setup(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < OBNUM; i++)
+ {
+ Efl_VG *gradient, *rect;
+ Eo *vector;
+ double w = 70, h = 70, stroke_w = 3;
+
+ vector = efl_add(EFL_CANVAS_VG_OBJECT_CLASS, evas);
+ o_shapes[i] = vector;
+ efl_gfx_entity_size_set(vector, EINA_SIZE2D(w + stroke_w * 2, h + stroke_w * 2));
+ efl_gfx_entity_position_set(vector, EINA_POSITION2D(0, 0));
+ efl_gfx_entity_visible_set(vector, EINA_TRUE);
+
+ gradient = efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, vector);
+ efl_gfx_gradient_stop_set(gradient, stops, 3);
+ efl_gfx_gradient_spread_set(gradient, EFL_GFX_GRADIENT_SPREAD_REFLECT);
+ efl_gfx_gradient_radial_center_set(gradient, w / 2 + stroke_w, h / 2 + stroke_w);
+ efl_gfx_gradient_radial_radius_set(gradient, w / 2);
+ /* Offset focal point to exercise asymmetric radial gradients */
+ efl_gfx_gradient_radial_focal_set(gradient, w / 2 + stroke_w + 10, h / 2 + stroke_w - 5);
+
+ rect = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, vector);
+ efl_gfx_path_append_rect(rect, 0 + stroke_w, 0 + stroke_w, w, h, 10, 10);
+ efl_canvas_vg_shape_fill_set(rect, gradient);
+ efl_gfx_shape_stroke_width_set(rect, stroke_w);
+ efl_gfx_shape_stroke_color_set(rect, 128, 0, 128, 128);
+ efl_gfx_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
+
+ efl_canvas_vg_object_root_node_set(vector, rect);
+ }
+ done = 0;
+}
+
+/* cleanup */
+static void _cleanup(void)
+{
+ unsigned int i;
+
+ for (i = 0; i < OBNUM; i++) efl_del(o_shapes[i]);
+}
+
+/* loop - do things */
+static void _loop(double t, int f)
+{
+ int i;
+ Evas_Coord x, y, w = 200, h = 200;
+ for (i = 0; i < OBNUM; i++)
+ {
+ x = (win_w / 2) - (w / 2);
+ x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
+ y = (win_h / 2) - (h / 2);
+ y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
+ efl_gfx_entity_position_set(o_shapes[i], EINA_POSITION2D(x, y));
+ }
+ 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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.