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 cd12063ed245fdcafc3d70242704e5d4f6e02fc6
Author: [email protected] <[email protected]>
AuthorDate: Wed Mar 25 21:58:38 2026 -0600

    test: add VG Basic Batman benchmark (fill + stroke)
    
    Add a VG test that renders the batman SVG path with both yellow fill
    and red stroke. This exercises the fill+stroke compositing path that
    simpler VG tests (rect, circle) skip since they only use stroke.
    
    The batman shape is a complex cubic Bezier path (~30 control points)
    that produces overlapping fill and stroke spans at AA boundaries,
    making it a good stress test for the span-buffer GL rendering pipeline.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 src/bin/meson.build       |   1 +
 src/bin/tests.h           |   1 +
 src/bin/vg_basic_batman.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 125 insertions(+)

diff --git a/src/bin/meson.build b/src/bin/meson.build
index 03c60b4..28061eb 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_batman.c',
 	'vg_scaled.c',
 	'snapshot_widgets_file_icons.c' ]
 
diff --git a/src/bin/tests.h b/src/bin/tests.h
index 3308836..ef54a91 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_batman.c"
 #include "vg_scaled.c"
 #include "snapshot_widgets_file_icons.c"
 #if 0 // test disabled - evas having code disabled
diff --git a/src/bin/vg_basic_batman.c b/src/bin/vg_basic_batman.c
new file mode 100644
index 0000000..fcd045a
--- /dev/null
+++ b/src/bin/vg_basic_batman.c
@@ -0,0 +1,123 @@
+#undef FNAME
+#undef NAME
+#undef ICON
+
+/* metadata */
+#define FNAME vg_basic_batman_start
+#define NAME "VG Basic Batman"
+#define ICON "vector.png"
+
+#ifndef PROTO
+# ifndef UI
+#  include "main.h"
+
+/* standard var */
+static int done = 0;
+
+/* private data */
+static Eo *o_shapes[OBNUM];
+
+/* Batman SVG path, pre-scaled to fit in ~80x70.
+ * Original coordinates (147-453, 18-284) translated to origin and
+ * scaled by (80/306, 70/266).  Tests VG rendering with both fill
+ * and stroke in a complex cubic Bezier shape. */
+static const char *batman_path =
+   "M 28.5,51.3 C 25.6,42.9 15.4,44.5 22.7,64.2"
+   " 0.0,42.9 5.8,14.0 22.5,0.0"
+   " 19.1,10.0 23.0,16.6 35.6,18.4"
+   " 36.1,16.0 36.3,13.5 36.9,11.1"
+   " 37.1,11.4 37.4,11.8 37.6,12.1"
+   " 37.6,12.1 39.2,11.8 40.0,11.8"
+   " 40.8,11.8 42.4,12.1 42.4,12.1"
+   " 42.6,11.8 42.9,11.4 43.1,11.1"
+   " 43.7,13.5 43.9,16.0 44.4,18.4"
+   " 57.0,16.8 60.9,10.0 57.5,0.0"
+   " 74.2,13.9 80.0,42.9 57.3,64.2"
+   " 64.6,44.5 54.6,42.9 51.5,51.3"
+   " 47.3,43.9 42.4,43.7 40.0,70.0"
+   " 37.6,43.7 32.7,43.9 28.5,51.3 Z";
+
+/* setup */
+static void _setup(void)
+{
+   unsigned int i;
+
+   for (i = 0; i < OBNUM; i++)
+     {
+        Efl_VG *shape;
+        Eo *vector;
+        double w = 80, h = 70, stroke_w = 2;
+
+        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);
+
+        shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, vector);
+        efl_canvas_vg_node_origin_set(shape, stroke_w, stroke_w);
+        efl_gfx_path_append_svg_path(shape, batman_path);
+        efl_gfx_color_set(shape, 255, 255, 0, 255);
+        efl_gfx_shape_stroke_width_set(shape, stroke_w);
+        efl_gfx_shape_stroke_color_set(shape, 255, 0, 0, 255);
+        efl_gfx_shape_stroke_join_set(shape, EFL_GFX_JOIN_ROUND);
+
+        efl_canvas_vg_object_root_node_set(vector, shape);
+     }
+   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.

Reply via email to