summaryrefslogtreecommitdiff
path: root/src/lib/ector/software
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-12-26 19:32:18 +0900
committerHermet Park <hermetpark@gmail.com>2018-12-26 19:32:42 +0900
commit0e278d1de8fddcb510a19010fa829dcc1e7f393c (patch)
treef0d71a702f1b808ebdb5c7ac1e55d2c85525015f /src/lib/ector/software
parente4e415d9573f01f49b0658237f7bc89cb3b68e2b (diff)
Revert "efl gfx_path: remove EFL_GFX_PATH_EVENT_CHANGED"
This reverts commit 7c38c0c9154b0971ccb8ecf5ea8f15467cfb6662. Oops, didn't intend this patch.
Diffstat (limited to 'src/lib/ector/software')
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.c43
-rw-r--r--src/lib/ector/software/ector_renderer_software_shape.eo2
2 files changed, 31 insertions, 14 deletions
diff --git a/src/lib/ector/software/ector_renderer_software_shape.c b/src/lib/ector/software/ector_renderer_software_shape.c
index b9cf1faaed..396e47283e 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.c
+++ b/src/lib/ector/software/ector_renderer_software_shape.c
@@ -734,20 +734,36 @@ _ector_renderer_software_shape_ector_renderer_software_op_fill(Eo *obj EINA_UNUS
734 return EINA_FALSE; 734 return EINA_FALSE;
735} 735}
736 736
737EOLIAN static void 737static void
738_ector_renderer_software_shape_efl_gfx_path_commit(Eo *obj EINA_UNUSED, 738_ector_renderer_software_shape_efl_gfx_path_path_set(Eo *obj,
739 Ector_Renderer_Software_Shape_Data *pd) 739 Ector_Renderer_Software_Shape_Data *pd,
740 const Efl_Gfx_Path_Command *op,
741 const double *points)
740{ 742{
741 if (pd->shape_data) 743 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
742 { 744 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
743 ector_software_rasterizer_destroy_rle_data(pd->shape_data); 745 pd->shape_data = NULL;
744 pd->shape_data = NULL; 746 pd->outline_data = NULL;
745 } 747
746 if (pd->outline_data) 748 efl_gfx_path_set(efl_super(obj, MY_CLASS), op, points);
747 { 749}
748 ector_software_rasterizer_destroy_rle_data(pd->outline_data); 750
749 pd->outline_data = NULL; 751
750 } 752static void
753_ector_renderer_software_shape_path_changed(void *data, const Efl_Event *event EINA_UNUSED)
754{
755 Ector_Renderer_Software_Shape_Data *pd = data;
756 Efl_Gfx_Path_Change_Event *ev = event->info;
757
758 if (ev && !((ev->what & EFL_GFX_CHANGE_FLAG_MATRIX) ||
759 (ev->what & EFL_GFX_CHANGE_FLAG_PATH)))
760 return;
761
762 if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
763 if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
764
765 pd->shape_data = NULL;
766 pd->outline_data = NULL;
751} 767}
752 768
753static Eo * 769static Eo *
@@ -761,6 +777,7 @@ _ector_renderer_software_shape_efl_object_constructor(Eo *obj, Ector_Renderer_So
761 pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj); 777 pd->public_shape = efl_data_xref(obj, EFL_GFX_SHAPE_MIXIN, obj);
762 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj); 778 pd->shape = efl_data_xref(obj, ECTOR_RENDERER_SHAPE_MIXIN, obj);
763 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj); 779 pd->base = efl_data_xref(obj, ECTOR_RENDERER_CLASS, obj);
780 efl_event_callback_add(obj, EFL_GFX_PATH_EVENT_CHANGED, _ector_renderer_software_shape_path_changed, pd);
764 781
765 return obj; 782 return obj;
766} 783}
diff --git a/src/lib/ector/software/ector_renderer_software_shape.eo b/src/lib/ector/software/ector_renderer_software_shape.eo
index 04f19ba7e3..abe8344f3f 100644
--- a/src/lib/ector/software/ector_renderer_software_shape.eo
+++ b/src/lib/ector/software/ector_renderer_software_shape.eo
@@ -8,7 +8,7 @@ class Ector.Renderer.Software.Shape (Ector.Renderer.Software, Ector.Renderer.Sha
8 Ector.Renderer.Software.op_fill; 8 Ector.Renderer.Software.op_fill;
9 Ector.Renderer.mask { set; } 9 Ector.Renderer.mask { set; }
10 Ector.Renderer.crc { get; } 10 Ector.Renderer.crc { get; }
11 Efl.Gfx.Path.commit; 11 Efl.Gfx.Path.path { set; }
12 Efl.Object.constructor; 12 Efl.Object.constructor;
13 Efl.Object.destructor; 13 Efl.Object.destructor;
14 } 14 }