summaryrefslogtreecommitdiff
path: root/src/lib/ector/cairo/ector_renderer_cairo_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ector/cairo/ector_renderer_cairo_shape.c')
-rw-r--r--src/lib/ector/cairo/ector_renderer_cairo_shape.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/ector/cairo/ector_renderer_cairo_shape.c b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
index 2605623..87fe2a0 100644
--- a/src/lib/ector/cairo/ector_renderer_cairo_shape.c
+++ b/src/lib/ector/cairo/ector_renderer_cairo_shape.c
@@ -75,19 +75,15 @@ struct _Ector_Renderer_Cairo_Shape_Data
75 cairo_path_t *path; 75 cairo_path_t *path;
76}; 76};
77 77
78static void 78EOLIAN static void
79_ector_renderer_cairo_shape_path_changed(void *data, const Efl_Event *event) 79_ector_renderer_cairo_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED,
80 Ector_Renderer_Cairo_Shape_Data *pd)
80{ 81{
81 Ector_Renderer_Cairo_Shape_Data *pd = data; 82 if (pd->path)
82 Efl_Gfx_Path_Change_Event *ev = event->info; 83 {
83 84 cairo_path_destroy(pd->path);
84 if (!pd->path) return; 85 pd->path = NULL;
85 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) || 86 }
86 (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
87 return;
88
89 cairo_path_destroy(pd->path);
90 pd->path = NULL;
91} 87}
92 88
93static Eina_Bool 89static Eina_Bool
@@ -255,9 +251,7 @@ _ector_renderer_cairo_shape_efl_object_constructor(Eo *obj, Ector_Renderer_Cairo
255 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 251 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
256 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 252 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
257 253
258 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_cairo_shape_path_changed, pd); 254 return obj;
259
260 return obj;
261} 255}
262 256
263static Efl_Object * 257static Efl_Object *