summaryrefslogtreecommitdiff
path: root/src/lib/ector/gl/ector_renderer_gl_shape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ector/gl/ector_renderer_gl_shape.c')
-rw-r--r--src/lib/ector/gl/ector_renderer_gl_shape.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/lib/ector/gl/ector_renderer_gl_shape.c b/src/lib/ector/gl/ector_renderer_gl_shape.c
index 79e029d..cf2266d 100644
--- a/src/lib/ector/gl/ector_renderer_gl_shape.c
+++ b/src/lib/ector/gl/ector_renderer_gl_shape.c
@@ -20,18 +20,15 @@ struct _Ector_Renderer_GL_Shape_Data
20 GLshort *vertex; 20 GLshort *vertex;
21}; 21};
22 22
23static void 23EOLIAN static void
24_ector_renderer_gl_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED) 24_ector_renderer_gl_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED,
25 Ector_Renderer_GL_Shape_Data *pd)
25{ 26{
26 Ector_Renderer_GL_Shape_Data *pd = data; 27 if (pd->vertex)
27 Efl_Gfx_Path_Change_Event *ev = event->info; 28 {
28 29 free(pd->vertex);
29 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) || 30 pd->vertex = NULL;
30 (ev->what & EFL_GFX_CHANGE_FLAG_PATH))) 31 }
31 return;
32
33 free(pd->vertex);
34 pd->vertex = NULL;
35} 32}
36 33
37static Eina_Bool 34static Eina_Bool
@@ -154,8 +151,6 @@ _ector_renderer_gl_shape_efl_object_constructor(Eo *obj, Ector_Renderer_GL_Shape
154 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 151 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
155 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 152 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
156 153
157 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_gl_shape_path_changed, pd);
158
159 return obj; 154 return obj;
160} 155}
161 156