summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c10
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c5
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c5
-rw-r--r--src/lib/efl/interfaces/efl_gfx.eo1
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.c34
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c5
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot9
-rw-r--r--src/lib/elementary/efl_ui_textpath.c7
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg.c2
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c6
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h3
12 files changed, 59 insertions, 30 deletions
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index 00bc3d43e1..7012491341 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -76,11 +76,17 @@ struct _Ector_Renderer_Cairo_Shape_Data
};
static void
-_ector_renderer_cairo_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
+_ector_renderer_cairo_shape_path_changed(void *data, const Efl_Event *event)
{
Ector_Renderer_Cairo_Shape_Data *pd = data;
+ Efl_Gfx_Path_Change_Event *ev = event->info;
- if (pd->path) cairo_path_destroy(pd->path);
+ if (!pd->path) return;
+ if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
+ (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
+ return;
+
+ cairo_path_destroy(pd->path);
pd->path = NULL;
}
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index b279129966..ecf78faec1 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -24,6 +24,11 @@ static void
_ector_renderer_gl_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
{
Ector_Renderer_GL_Shape_Data *pd = data;
+ Efl_Gfx_Path_Change_Event *ev = event->info;
+
+ if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
+ (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
+ return;
free(pd->vertex);
pd->vertex = NULL;
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index 25da9cae29..e60e1d6e95 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -746,6 +746,11 @@ static void
_ector_renderer_software_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
{
Ector_Renderer_Software_Shape_Data *pd = data;
+ Efl_Gfx_Path_Change_Event *ev = event->info;
+
+ if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
+ (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
+ return;
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
diff --git a/src/lib/efl/interfaces/efl_gfx.eo b/src/lib/efl/interfaces/efl_gfx.eo
index 6b30097bf3..3d073c2fc7 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -146,6 +146,5 @@ interface Efl.Gfx {
hide; [[Object just became invisible.]]
move; [[Object was moved, its position during the event is the new one.]]
resize; [[Object was resized, its size during the event is the new one.]]
- changed; [[Object was changed]]
}
}
diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c
index b744ef1e37..2901373ddc 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.c
+++ b/src/lib/efl/interfaces/efl_gfx_path.c
@@ -149,6 +149,7 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
const Efl_Gfx_Path_Command *commands,
const double *points)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
Efl_Gfx_Path_Command *cmds;
double *pts;
unsigned int cmds_length = 0, pts_length = 0;
@@ -184,9 +185,9 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
_efl_gfx_path_current_search(pd->commands, pd->points,
&pd->current.x, &pd->current.y,
&pd->current_ctrl.x, &pd->current_ctrl.y);
+
end:
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
EOLIAN static void
@@ -276,6 +277,7 @@ EOLIAN static Eina_Bool
_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
const Eo *from, const Eo *to, double pos_map)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
Efl_Gfx_Path_Data *from_pd, *to_pd;
Efl_Gfx_Path_Command *cmds;
double *pts;
@@ -339,8 +341,7 @@ _efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
pd->current_ctrl.y = interpolate(from_pd->current_ctrl.y,
to_pd->current_ctrl.y, pos_map);
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
return EINA_TRUE;
}
@@ -361,6 +362,8 @@ _efl_gfx_path_equal_commands(Eo *obj EINA_UNUSED,
EOLIAN static void
_efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
+
free(pd->commands);
pd->commands = NULL;
pd->commands_count = 0;
@@ -375,14 +378,14 @@ _efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd)
pd->current_ctrl.y = 0;
pd->convex = EINA_FALSE;
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
EOLIAN static void
_efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd,
double x, double y)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
double *offset_point;
if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO, pd, &offset_point))
@@ -394,14 +397,14 @@ _efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd,
pd->current.x = x;
pd->current.y = y;
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
EOLIAN static void
_efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd,
double x, double y)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
double *offset_point;
if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_LINE_TO, pd, &offset_point))
@@ -413,8 +416,7 @@ _efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd,
pd->current.x = x;
pd->current.y = y;
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
EOLIAN static void
@@ -423,6 +425,7 @@ _efl_gfx_path_append_cubic_to(Eo *obj, Efl_Gfx_Path_Data *pd,
double ctrl_x1, double ctrl_y1,
double x, double y)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
double *offset_point;
if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO,
@@ -441,8 +444,7 @@ _efl_gfx_path_append_cubic_to(Eo *obj, Efl_Gfx_Path_Data *pd,
pd->current_ctrl.x = ctrl_x1;
pd->current_ctrl.y = ctrl_y1;
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
EOLIAN static void
@@ -1028,12 +1030,12 @@ _efl_gfx_path_append_arc(Eo *obj, Efl_Gfx_Path_Data *pd,
EOLIAN static void
_efl_gfx_path_append_close(Eo *obj, Efl_Gfx_Path_Data *pd)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
double *offset_point;
efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, pd, &offset_point);
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
static void
@@ -1578,6 +1580,7 @@ _efl_gfx_path_append_svg_path(Eo *obj, Efl_Gfx_Path_Data *pd,
EOLIAN static void
_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
Efl_Gfx_Path_Data *from;
if (obj == dup_from) return;
@@ -1588,8 +1591,7 @@ _efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
_efl_gfx_path_path_set(obj, pd, from->commands, from->points);
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
#include "interfaces/efl_gfx_path.eo.c"
diff --git a/src/lib/efl/interfaces/efl_gfx_path.eo b/src/lib/efl/interfaces/efl_gfx_path.eo
index 4b8961dd74..b36bf090dd 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.eo
+++ b/src/lib/efl/interfaces/efl_gfx_path.eo
@@ -284,6 +284,6 @@ mixin Efl.Gfx.Path
}
}
events {
- changed; [[Graphics path was changed.]]
+ changed: Efl.Gfx.Path.Change_Event; [[Graphics path was changed.]]
}
}
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index 00bad6677f..3e88e8603f 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -161,9 +161,10 @@ _efl_gfx_shape_stroke_color_get(Eo *obj EINA_UNUSED, Efl_Gfx_Shape_Data *pd,
EOLIAN static void
_efl_gfx_shape_stroke_width_set(Eo *obj, Efl_Gfx_Shape_Data *pd, double w)
{
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
+
pd->public.stroke.width = w;
- efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL);
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
EOLIAN static double
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot
index 7c6c43ec18..1b3598a3cf 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -146,13 +146,18 @@ enum Efl.Gfx.Border_Fill_Mode
solid = 2 [[Image's center region is to be made solid, even if it has transparency on it]]
}
-enum Efl.Gfx.Change.Flag
+enum Efl.Gfx.Change_Flag
{
[[What property got changed for this object @since 1.18]]
none = 0x0, [[No change]]
matrix = 0x1, [[matrix got changed]]
path = 0x2, [[path got changes]]
- all = -1 [[all property got changed]]
+ fill = 0x4, [[coloring or fill information changed, not geometry]]
+ all = 0xffff [[all properties got changed]]
+}
+
+struct Efl.Gfx.Path.Change_Event {
+ what: Efl.Gfx.Change_Flag; [[Indicates what changed.]]
}
struct Efl.Gfx.Event.Render_Post
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index 5ab8e8a966..9a64896521 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -438,10 +438,15 @@ _ellipsis_set(Efl_Ui_Textpath_Data *pd)
}
static void
-_path_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
+_path_changed_cb(void *data, const Efl_Event *event)
{
+ Efl_Gfx_Path_Change_Event *ev = event->info;
EFL_UI_TEXTPATH_DATA_GET(data, sd);
+ if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
+ (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
+ return;
+
_path_data_get(data, sd, EINA_TRUE);
_sizing_eval(sd);
}
diff --git a/src/lib/evas/canvas/efl_canvas_vg.c b/src/lib/evas/canvas/efl_canvas_vg.c
index ad8dc66f0b..e981619dc6 100644
--- a/src/lib/evas/canvas/efl_canvas_vg.c
+++ b/src/lib/evas/canvas/efl_canvas_vg.c
@@ -343,7 +343,7 @@ _efl_canvas_vg_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Data *pd)
eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);
- efl_event_callback_add(pd->root, EFL_GFX_EVENT_CHANGED, _evas_vg_tree_changed, obj);
+ efl_event_callback_add(pd->root, EFL_GFX_PATH_EVENT_CHANGED, _evas_vg_tree_changed, obj);
return eo_obj;
}
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index ae502c1bf1..e6af1ee8dc 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -17,7 +17,7 @@ static const Efl_VG_Interpolation interpolation_identity = {
};
static void
-_efl_vg_property_changed(void *data, const Efl_Event *event)
+_efl_vg_property_changed(void *data, const Efl_Event *event EINA_UNUSED)
{
Efl_VG_Data *pd = data;
Eo *parent;
@@ -25,7 +25,7 @@ _efl_vg_property_changed(void *data, const Efl_Event *event)
if (!pd->flags) pd->flags = EFL_GFX_CHANGE_FLAG_ALL;
parent = efl_parent_get(event->object);
- efl_event_callback_legacy_call(parent, event->desc, event->info);
+ efl_event_callback_call(parent, event->desc, event->info);
}
static void
@@ -252,7 +252,7 @@ _efl_vg_efl_object_constructor(Eo *obj,
return NULL;
}
- efl_event_callback_add(obj, EFL_GFX_EVENT_CHANGED, _efl_vg_property_changed, pd);
+ efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _efl_vg_property_changed, pd);
pd->flags = EFL_GFX_CHANGE_FLAG_ALL;
pd->changed = EINA_TRUE;
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 987991097c..e2f393fec2 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -127,7 +127,8 @@ _evas_vg_render_pre(Efl_VG *child, Ector_Surface *s, Eina_Matrix3 *m)
static inline void
_efl_vg_changed(Eo *obj)
{
- efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
+ Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_FILL };
+ efl_event_callback_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
}
static inline void *