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