This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch edje-vector-intergration
in repository efl.
View the commit online.
commit 2aff5060a54c29ff46d028058c5d8287a3088b74
Author: [email protected] <[email protected]>
AuthorDate: Tue Apr 28 22:46:08 2026 -0600
edje: add override parser-mode substrate (Task 4.2)
Lay groundwork for override authoring blocks (Task 4.3) by introducing
parser-context substrate for tracking which override fields are modified.
Add file-private `current_vg_override` pointer that Task 4.3 will set when
entering override {} blocks. Define `VG_FLAG(BIT)` macro that ORs the
corresponding `EDJE_VG_OVR_*` field-mask bit during override mode (no-op
when NULL). Insert 25 VG_FLAG(...) call sites in property handlers from
Tasks 2.5/2.6/2.7 to record which fields are touched. Behavior unchanged:
override blocks not yet wired, so all macro calls are dead branches and
inline-tree path identical to before.
Notable design choices:
- st_vg_node_name has no flag — identity is target_name, not property.
- stop{} property handlers (_offset, _color, _color_class) have no flag —
opener sets GRAD_STOPS atomically, applied once at materialization.
- fill.color and fill.gradient share FILL_RAW bit — both in same substruct,
recopied together; simplified field mapping for v1 override system.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
---
src/bin/edje/edje_cc_handlers.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 4b97083dbb..99dc50933d 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -188,6 +188,18 @@ static Eina_List *all_vg_trees = NULL;
* desc->vg.tree_id after sequential indices are assigned. */
static Eina_Hash *_vg_desc_to_tree = NULL;
+/* Task 4.2: Override authoring mode — set by Task 4.3's override block opener,
+ * cleared by close-pop. When non-NULL, property handlers OR the appropriate
+ * EDJE_VG_OVR_* bit into current_vg_override->field_mask in addition to
+ * writing onto current_vg_node (which Task 4.3 will point at the override's
+ * embedded payload). */
+static Edje_Vg_Override *current_vg_override = NULL;
+
+/* OR a field-mask bit when inside an override block; no-op otherwise. */
+#define VG_FLAG(BIT) \
+ do { if (current_vg_override) \
+ current_vg_override->field_mask |= EDJE_VG_OVR_##BIT; } while (0)
+
/* Record a description → tree linkage in the side table. */
static void
_vg_record_use(Edje_Part_Description_Vector *ed, Edje_Vg_Tree *t)
@@ -1831,6 +1843,7 @@ st_vg_node_visible(void)
check_arg_count(1);
if (!current_vg_node) error_and_abort(NULL, "visible: outside node");
current_vg_node->visible = parse_bool(0) ? 1 : 0;
+ VG_FLAG(VISIBLE);
}
/**
@@ -1855,6 +1868,7 @@ st_vg_node_color(void)
current_vg_node->color.g = parse_int_range(1, 0, 255);
current_vg_node->color.b = parse_int_range(2, 0, 255);
current_vg_node->color.a = parse_int_range(3, 0, 255);
+ VG_FLAG(COLOR_RAW);
}
/**
@@ -1877,6 +1891,7 @@ st_vg_node_color_class(void)
char *s = parse_str(0);
eina_stringshare_replace(¤t_vg_node->color.color_class, s);
free(s);
+ VG_FLAG(COLOR_CLASS);
}
/**
@@ -1900,6 +1915,7 @@ st_vg_node_transform_translate(void)
current_vg_node->xform.tx = parse_float(0);
current_vg_node->xform.ty = parse_float(1);
current_vg_node->xform.has_matrix = 0;
+ VG_FLAG(TRANSFORM);
}
/**
@@ -1920,6 +1936,7 @@ st_vg_node_transform_rotate(void)
if (!current_vg_node) error_and_abort(NULL, "transform.rotate: outside node");
current_vg_node->xform.angle = parse_float(0);
current_vg_node->xform.has_matrix = 0;
+ VG_FLAG(TRANSFORM);
}
/**
@@ -1941,6 +1958,7 @@ st_vg_node_transform_scale(void)
current_vg_node->xform.sx = parse_float(0);
current_vg_node->xform.sy = parse_float(1);
current_vg_node->xform.has_matrix = 0;
+ VG_FLAG(TRANSFORM);
}
/**
@@ -1965,6 +1983,7 @@ st_vg_node_transform_matrix(void)
for (i = 0; i < 9; i++)
current_vg_node->xform.m[i] = parse_float(i);
current_vg_node->xform.has_matrix = 1;
+ VG_FLAG(TRANSFORM);
}
/* -----------------------------------------------------------------------
@@ -2001,6 +2020,7 @@ st_vg_shape_path(void)
char *p = parse_str(0);
eina_stringshare_replace(¤t_vg_node->shape.path, p);
free(p);
+ VG_FLAG(PATH);
}
/**
@@ -2023,6 +2043,7 @@ st_vg_shape_fill_color(void)
current_vg_node->shape.fill.g = parse_int_range(1, 0, 255);
current_vg_node->shape.fill.b = parse_int_range(2, 0, 255);
current_vg_node->shape.fill.a = parse_int_range(3, 0, 255);
+ VG_FLAG(FILL_RAW);
}
/**
@@ -2044,6 +2065,7 @@ st_vg_shape_fill_color_class(void)
char *s = parse_str(0);
eina_stringshare_replace(¤t_vg_node->shape.fill.color_class, s);
free(s);
+ VG_FLAG(FILL_CLASS);
}
/**
@@ -2066,6 +2088,7 @@ st_vg_shape_fill_gradient(void)
char *s = parse_str(0);
eina_stringshare_replace(¤t_vg_node->shape.gradient_ref, s);
free(s);
+ VG_FLAG(FILL_RAW);
}
/**
@@ -2088,6 +2111,7 @@ st_vg_shape_stroke_color(void)
current_vg_node->shape.stroke_color.g = parse_int_range(1, 0, 255);
current_vg_node->shape.stroke_color.b = parse_int_range(2, 0, 255);
current_vg_node->shape.stroke_color.a = parse_int_range(3, 0, 255);
+ VG_FLAG(STROKE_RAW);
}
/**
@@ -2108,6 +2132,7 @@ st_vg_shape_stroke_color_class(void)
char *s = parse_str(0);
eina_stringshare_replace(¤t_vg_node->shape.stroke_color.color_class, s);
free(s);
+ VG_FLAG(STROKE_CLASS);
}
/**
@@ -2126,6 +2151,7 @@ st_vg_shape_stroke_width(void)
check_arg_count(1);
EXPECT_SHAPE();
current_vg_node->shape.stroke_width = parse_float(0);
+ VG_FLAG(STROKE_WIDTH);
}
/**
@@ -2153,6 +2179,7 @@ st_vg_shape_stroke_cap(void)
error_and_abort(NULL, "stroke.cap: unknown value (BUTT|ROUND|SQUARE)");
}
free(s);
+ VG_FLAG(STROKE_CAP);
}
/**
@@ -2180,6 +2207,7 @@ st_vg_shape_stroke_join(void)
error_and_abort(NULL, "stroke.join: unknown value (MITER|ROUND|BEVEL)");
}
free(s);
+ VG_FLAG(STROKE_JOIN);
}
/**
@@ -2210,6 +2238,7 @@ st_vg_shape_stroke_dash(void)
for (i = 0; i < n; i++)
current_vg_node->shape.stroke_dash[i] = parse_float(i);
current_vg_node->shape.stroke_dash_count = (unsigned int)n;
+ VG_FLAG(STROKE_DASH);
}
/**
@@ -2238,6 +2267,7 @@ st_vg_shape_fill_rule(void)
error_and_abort(NULL, "fill_rule: unknown value (WINDING|EVEN_ODD)");
}
free(s);
+ VG_FLAG(FILL_RULE);
}
/* -----------------------------------------------------------------------
@@ -2289,6 +2319,7 @@ st_vg_grad_start(void)
EXPECT_GRADIENT_LINEAR();
current_vg_node->gradient.x0 = parse_float(0);
current_vg_node->gradient.y0 = parse_float(1);
+ VG_FLAG(GRAD_GEOM);
}
/**
@@ -2309,6 +2340,7 @@ st_vg_grad_end(void)
EXPECT_GRADIENT_LINEAR();
current_vg_node->gradient.x1 = parse_float(0);
current_vg_node->gradient.y1 = parse_float(1);
+ VG_FLAG(GRAD_GEOM);
}
/**
@@ -2329,6 +2361,7 @@ st_vg_grad_center(void)
EXPECT_GRADIENT_RADIAL();
current_vg_node->gradient.x0 = parse_float(0);
current_vg_node->gradient.y0 = parse_float(1);
+ VG_FLAG(GRAD_GEOM);
}
/**
@@ -2349,6 +2382,7 @@ st_vg_grad_focal(void)
EXPECT_GRADIENT_RADIAL();
current_vg_node->gradient.x1 = parse_float(0);
current_vg_node->gradient.y1 = parse_float(1);
+ VG_FLAG(GRAD_GEOM);
}
/**
@@ -2368,6 +2402,7 @@ st_vg_grad_radius(void)
check_arg_count(1);
EXPECT_GRADIENT_RADIAL();
current_vg_node->gradient.radius = parse_float(0);
+ VG_FLAG(GRAD_GEOM);
}
/**
@@ -2398,6 +2433,7 @@ st_vg_grad_spread(void)
error_and_abort(NULL, "spread: unknown value (PAD|REFLECT|REPEAT)");
}
free(s);
+ VG_FLAG(GRAD_SPREAD);
}
/**
@@ -2429,6 +2465,7 @@ ob_vg_grad_stop(void)
current_vg_node->gradient.stops_count = n;
/* The active stop is the last element; stop {} has no sub-blocks so
no stack push is needed. Statements write to [stops_count - 1]. */
+ VG_FLAG(GRAD_STOPS);
}
/* Returns a pointer to the last stop in current_vg_node's stops array.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.