summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-12-07 19:38:48 +0900
committerHermet Park <hermetpark@gmail.com>2018-12-07 19:50:08 +0900
commitfbe92aa67f18f8c0401cdc6d4440ed512c43b131 (patch)
tree0a681b5f232105491183dfdb4efcc5d5d7050689 /src/lib/evas
parent4d6f20d714ea083471be163f67af518eced4028c (diff)
evas ector: add software implmentation for masking feature.
This implementation uses Ector_Buffer to generate mask image from vg container, and pass it to Ector engine. Ector renderer could blend this image as a mask. Yet only vg container works as a mask, we could extend shape to support masking later. Still vector gl drawing is not completed, We use software ector buffer to draw on it. This is on progessing.
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c163
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.eo5
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c23
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c21
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node.c41
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node.eo7
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c102
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c32
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h30
-rw-r--r--src/lib/evas/include/evas_private.h6
10 files changed, 290 insertions, 140 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index ccb8bfbf76..addbf0cbc9 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -22,17 +22,75 @@ _invalidate_cb(void *data EINA_UNUSED, const Efl_Event *event)
22 efl_unref(child); 22 efl_unref(child);
23} 23}
24 24
25static Ector_Buffer *
26_prepare_mask(Evas_Object_Protected_Data *obj, //vector object
27 Efl_Canvas_Vg_Node* mask_obj,
28 Ector_Surface *surface,
29 Eina_Matrix3 *ptransform,
30 Ector_Buffer *mask,
31 int mask_op)
32{
33 Efl_Canvas_Vg_Container_Data *pd = efl_data_scope_get(mask_obj, MY_CLASS);
34 Efl_Canvas_Vg_Node_Data *nd =
35 efl_data_scope_get(mask_obj, EFL_CANVAS_VG_NODE_CLASS);
36 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return pd->mask.buffer;
37
38 //1. Mask Size
39 Eina_Rect mbound;
40 mbound.x = 0;
41 mbound.y = 0;
42 mbound.w = obj->cur->geometry.w;
43 mbound.h = obj->cur->geometry.h;
44
45// efl_gfx_path_bounds_get(mask, &mbound);
46
47 //2. Reusable ector buffer?
48 if (!pd->mask.buffer || (pd->mask.bound.w != mbound.w) ||
49 (pd->mask.bound.h != mbound.h))
50 {
51 if (pd->mask.pixels) free(pd->mask.pixels);
52 if (pd->mask.buffer) efl_unref(pd->mask.buffer);
53 pd->mask.pixels = calloc(sizeof(uint32_t), mbound.w * mbound.h);
54 pd->mask.buffer = ENFN->ector_buffer_new(ENC, obj->layer->evas->evas,
55 mbound.w, mbound.h,
56 EFL_GFX_COLORSPACE_ARGB8888,
57 ECTOR_BUFFER_FLAG_DRAWABLE |
58 ECTOR_BUFFER_FLAG_CPU_READABLE |
59 ECTOR_BUFFER_FLAG_CPU_WRITABLE);
60 ector_buffer_pixels_set(pd->mask.buffer, pd->mask.pixels,
61 mbound.w, mbound.h, 0,
62 EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE);
63 pd->mask.bound.w = mbound.w;
64 pd->mask.bound.h = mbound.h;
65 pd->mask.vg_pd = obj;
66 }
67
68 pd->mask.bound.x = mbound.x;
69 pd->mask.bound.y = mbound.y;
70
71 if (!pd->mask.buffer) ERR("Mask Buffer is invalid");
72
73 pd->mask.dirty = EINA_TRUE;
74
75 //3. Prepare Drawing shapes...
76 _evas_vg_render_pre(obj, mask_obj, surface, ptransform, mask, mask_op);
77
78 return pd->mask.buffer;
79}
80
25static void 81static void
26_efl_canvas_vg_container_render_pre(Eo *obj EINA_UNUSED, 82_efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
27 Eina_Matrix3 *parent, 83 Efl_VG *obj EINA_UNUSED,
28 Ector_Surface *s, 84 Efl_Canvas_Vg_Node_Data *nd,
29 void *data, 85 Ector_Surface *surface,
30 Efl_Canvas_Vg_Node_Data *nd) 86 Eina_Matrix3 *ptransform,
87 Ector_Buffer *mask,
88 int mask_op,
89 void *data)
31{ 90{
32 Efl_Canvas_Vg_Container_Data *pd = data; 91 Efl_Canvas_Vg_Container_Data *pd = data;
33 Eina_List *l; 92 Eina_List *l;
34 Eo *child; 93 Efl_VG *child;
35 Efl_Canvas_Vg_Node_Data *child_nd;
36 Efl_Gfx_Change_Flag flag; 94 Efl_Gfx_Change_Flag flag;
37 95
38 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return; 96 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return;
@@ -40,20 +98,37 @@ _efl_canvas_vg_container_render_pre(Eo *obj EINA_UNUSED,
40 flag = nd->flags; 98 flag = nd->flags;
41 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 99 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
42 100
43 EFL_CANVAS_VG_COMPUTE_MATRIX(current, parent, nd); 101 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
102
103 //Container may have mask source.
104 if (pd->mask_src)
105 {
106 mask = _prepare_mask(vg_pd, pd->mask_src, surface, ptransform, mask,
107 mask_op);
108 mask_op = pd->mask.option;
109 }
44 110
45 EINA_LIST_FOREACH(pd->children, l, child) 111 EINA_LIST_FOREACH(pd->children, l, child)
46 { 112 {
113 //Don't need to update mask nodes.
114 if (efl_isa(child, MY_CLASS))
115 {
116 Efl_Canvas_Vg_Container_Data *child_cd =
117 efl_data_scope_get(child, MY_CLASS);
118 if (child_cd->mask.target) continue;
119 }
120
47 //Skip Gradients. they will be updated by Shape. 121 //Skip Gradients. they will be updated by Shape.
48 if (efl_isa(child, EFL_CANVAS_VG_GRADIENT_CLASS)) 122 if (efl_isa(child, EFL_CANVAS_VG_GRADIENT_CLASS))
49 continue; 123 continue;
50 124
125 Efl_Canvas_Vg_Node_Data *child_nd =
126 efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
127
51 if (flag & EFL_GFX_CHANGE_FLAG_MATRIX) 128 if (flag & EFL_GFX_CHANGE_FLAG_MATRIX)
52 { 129 child_nd->flags |= EFL_GFX_CHANGE_FLAG_MATRIX;
53 child_nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS); 130
54 child_nd->flags |= EFL_GFX_CHANGE_FLAG_MATRIX; 131 _evas_vg_render_pre(vg_pd, child, surface, ctransform, mask, mask_op);
55 }
56 _evas_vg_render_pre(child, s, current);
57 } 132 }
58} 133}
59 134
@@ -77,16 +152,23 @@ _efl_canvas_vg_container_efl_object_constructor(Eo *obj,
77 152
78static void 153static void
79_efl_canvas_vg_container_efl_object_destructor(Eo *obj, 154_efl_canvas_vg_container_efl_object_destructor(Eo *obj,
80 Efl_Canvas_Vg_Container_Data *pd EINA_UNUSED) 155 Efl_Canvas_Vg_Container_Data *pd)
81{ 156{
82 efl_destructor(efl_super(obj, MY_CLASS)); 157 //Destroy mask surface
158 if (pd->mask.buffer) efl_unref(pd->mask.buffer);
159 if (pd->mask.pixels) free(pd->mask.pixels);
160
161 efl_unref(pd->mask_src);
162 eina_list_free(pd->mask.target);
83 eina_hash_free(pd->names); 163 eina_hash_free(pd->names);
164
165 efl_destructor(efl_super(obj, MY_CLASS));
84} 166}
85 167
86static void 168static void
87_efl_canvas_vg_container_efl_gfx_path_bounds_get(const Eo *obj EINA_UNUSED, 169_efl_canvas_vg_container_efl_gfx_path_bounds_get(const Eo *obj EINA_UNUSED,
88 Efl_Canvas_Vg_Container_Data *pd, 170 Efl_Canvas_Vg_Container_Data *pd,
89 Eina_Rect *r) 171 Eina_Rect *r)
90{ 172{
91 Eina_Rect s; 173 Eina_Rect s;
92 Eina_Bool first = EINA_TRUE; 174 Eina_Bool first = EINA_TRUE;
@@ -162,12 +244,51 @@ _efl_canvas_vg_container_efl_gfx_path_interpolate(Eo *obj, Efl_Canvas_Vg_Contain
162 if (!r) break; 244 if (!r) break;
163 } 245 }
164 246
247 //Interpolates Mask
248 Efl_Canvas_Vg_Container_Data *fromd = efl_data_scope_get(from, MY_CLASS);
249 Efl_Canvas_Vg_Container_Data *tod = efl_data_scope_get(to, MY_CLASS);
250
251 if (fromd->mask_src && tod->mask_src && pd->mask_src)
252 {
253 if (!efl_gfx_path_interpolate(pd->mask_src,
254 fromd->mask_src, tod->mask_src, pos_map))
255 return EINA_FALSE;
256 }
257
165 eina_iterator_free(from_it); 258 eina_iterator_free(from_it);
166 eina_iterator_free(to_it); 259 eina_iterator_free(to_it);
167 260
168 return r; 261 return r;
169} 262}
170 263
264static void
265_efl_canvas_vg_container_efl_canvas_vg_node_mask_set(Eo *obj,
266 Efl_Canvas_Vg_Container_Data *pd,
267 Efl_Canvas_Vg_Node *mask,
268 int op)
269{
270 if (pd->mask_src == mask) return;
271
272 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(mask, MY_CLASS));
273
274 if (pd->mask_src)
275 {
276 Efl_Canvas_Vg_Container_Data *pd2 =
277 efl_data_scope_get(pd->mask_src, MY_CLASS);
278 pd2->mask.target = eina_list_remove(pd2->mask.target, obj);
279 }
280
281 if (mask)
282 {
283 Efl_Canvas_Vg_Container_Data *pd2 = efl_data_scope_get(mask, MY_CLASS);
284 pd2->mask.target = eina_list_append(pd2->mask.target, obj);
285 }
286
287 pd->mask.option = op;
288 efl_replace(&pd->mask_src, mask);
289 _efl_canvas_vg_node_changed(obj);
290}
291
171EOLIAN static Efl_VG * 292EOLIAN static Efl_VG *
172_efl_canvas_vg_container_efl_duplicate_duplicate(const Eo *obj, 293_efl_canvas_vg_container_efl_duplicate_duplicate(const Eo *obj,
173 Efl_Canvas_Vg_Container_Data *pd) 294 Efl_Canvas_Vg_Container_Data *pd)
@@ -180,6 +301,14 @@ _efl_canvas_vg_container_efl_duplicate_duplicate(const Eo *obj,
180 efl_event_callback_add(container, EFL_EVENT_INVALIDATE, _invalidate_cb, NULL); 301 efl_event_callback_add(container, EFL_EVENT_INVALIDATE, _invalidate_cb, NULL);
181 efl_parent_set(container, efl_parent_get(obj)); 302 efl_parent_set(container, efl_parent_get(obj));
182 303
304 //Copy Mask
305 if (pd->mask_src)
306 {
307 Eo * mask_src = efl_duplicate(pd->mask_src);
308 efl_parent_set(mask_src, container);
309 efl_canvas_vg_node_mask_set(container, mask_src, pd->mask.option);
310 }
311
183 //Copy Children 312 //Copy Children
184 EINA_LIST_FOREACH(pd->children, l, child) 313 EINA_LIST_FOREACH(pd->children, l, child)
185 { 314 {
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.eo b/src/lib/evas/canvas/efl_canvas_vg_container.eo
index f89d584d86..4060441d44 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.eo
@@ -4,14 +4,14 @@ class Efl.Canvas.Vg.Container (Efl.Canvas.Vg.Node)
4 legacy_prefix: evas_vg_container; 4 legacy_prefix: evas_vg_container;
5 methods { 5 methods {
6 child_get { 6 child_get {
7 [[Get child of container]] 7 [[Get child of container]]
8 params { 8 params {
9 @in name: string; [[Child node name]] 9 @in name: string; [[Child node name]]
10 } 10 }
11 return: Efl.Canvas.Vg.Node; [[Child object]] 11 return: Efl.Canvas.Vg.Node; [[Child object]]
12 } 12 }
13 children_get { 13 children_get {
14 [[Get all children of container]] 14 [[Get all children of container]]
15 return: iterator<Efl.Canvas.Vg.Node> @owned @warn_unused; [[Iterator to children]] 15 return: iterator<Efl.Canvas.Vg.Node> @owned @warn_unused; [[Iterator to children]]
16 } 16 }
17 } 17 }
@@ -21,5 +21,6 @@ class Efl.Canvas.Vg.Container (Efl.Canvas.Vg.Node)
21 Efl.Gfx.Path.bounds_get; 21 Efl.Gfx.Path.bounds_get;
22 Efl.Gfx.Path.interpolate; 22 Efl.Gfx.Path.interpolate;
23 Efl.Duplicate.duplicate; 23 Efl.Duplicate.duplicate;
24 Efl.Canvas.Vg.Node.mask { set; }
24 } 25 }
25} 26}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
index 391f9c81b5..fa35d29153 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
@@ -56,30 +56,33 @@ _efl_canvas_vg_gradient_linear_efl_gfx_gradient_linear_end_get(const Eo *obj EIN
56} 56}
57 57
58static void 58static void
59_efl_canvas_vg_gradient_linear_render_pre(Eo *obj, 59_efl_canvas_vg_gradient_linear_render_pre(Evas_Object_Protected_Data *vg_pd EINA_UNUSED,
60 Eina_Matrix3 *parent, 60 Efl_VG *obj,
61 Ector_Surface *s, 61 Efl_Canvas_Vg_Node_Data *nd,
62 void *data, 62 Ector_Surface *surface,
63 Efl_Canvas_Vg_Node_Data *nd) 63 Eina_Matrix3 *ptransform,
64 Ector_Buffer *mask,
65 int mask_op,
66 void *data)
64{ 67{
65 Efl_Canvas_Vg_Gradient_Linear_Data *pd = data; 68 Efl_Canvas_Vg_Gradient_Linear_Data *pd = data;
66 Efl_Canvas_Vg_Gradient_Data *gd; 69 Efl_Canvas_Vg_Gradient_Data *gd;
67 70
68 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return ; 71 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return;
69 72
70 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 73 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
71 74
72 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS); 75 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS);
73 EFL_CANVAS_VG_COMPUTE_MATRIX(current, parent, nd); 76 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
74 77
75 if (!nd->renderer) 78 if (!nd->renderer)
76 { 79 {
77 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 80 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
78 nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN); 81 nd->renderer = ector_surface_renderer_factory_new(surface, ECTOR_RENDERER_GRADIENT_LINEAR_MIXIN);
79 efl_domain_current_pop(); 82 efl_domain_current_pop();
80 } 83 }
81 84
82 ector_renderer_transformation_set(nd->renderer, current); 85 ector_renderer_transformation_set(nd->renderer, ctransform);
83 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 86 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
84 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 87 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a);
85 ector_renderer_visibility_set(nd->renderer, nd->visibility); 88 ector_renderer_visibility_set(nd->renderer, nd->visibility);
@@ -87,8 +90,8 @@ _efl_canvas_vg_gradient_linear_render_pre(Eo *obj,
87 efl_gfx_gradient_spread_set(nd->renderer, gd->spread); 90 efl_gfx_gradient_spread_set(nd->renderer, gd->spread);
88 efl_gfx_gradient_linear_start_set(nd->renderer, pd->start.x, pd->start.y); 91 efl_gfx_gradient_linear_start_set(nd->renderer, pd->start.x, pd->start.y);
89 efl_gfx_gradient_linear_end_set(nd->renderer, pd->end.x, pd->end.y); 92 efl_gfx_gradient_linear_end_set(nd->renderer, pd->end.x, pd->end.y);
90
91 ector_renderer_prepare(nd->renderer); 93 ector_renderer_prepare(nd->renderer);
94 ector_renderer_mask_set(nd->renderer, mask, mask_op);
92} 95}
93 96
94static Eo * 97static Eo *
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
index 6a72b7e4da..9ff537e2ed 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
@@ -72,11 +72,14 @@ _efl_canvas_vg_gradient_radial_efl_gfx_gradient_radial_focal_get(const Eo *obj E
72} 72}
73 73
74static void 74static void
75_efl_canvas_vg_gradient_radial_render_pre(Eo *obj, 75_efl_canvas_vg_gradient_radial_render_pre(Evas_Object_Protected_Data *vg_pd EINA_UNUSED,
76 Eina_Matrix3 *parent, 76 Efl_VG *obj,
77 Ector_Surface *s, 77 Efl_Canvas_Vg_Node_Data *nd,
78 void *data, 78 Ector_Surface *surface,
79 Efl_Canvas_Vg_Node_Data *nd) 79 Eina_Matrix3 *ptransform,
80 Ector_Buffer *mask,
81 int mask_op,
82 void *data)
80{ 83{
81 Efl_Canvas_Vg_Gradient_Radial_Data *pd = data; 84 Efl_Canvas_Vg_Gradient_Radial_Data *pd = data;
82 Efl_Canvas_Vg_Gradient_Data *gd; 85 Efl_Canvas_Vg_Gradient_Data *gd;
@@ -86,16 +89,16 @@ _efl_canvas_vg_gradient_radial_render_pre(Eo *obj,
86 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 89 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
87 90
88 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS); 91 gd = efl_data_scope_get(obj, EFL_CANVAS_VG_GRADIENT_CLASS);
89 EFL_CANVAS_VG_COMPUTE_MATRIX(current, parent, nd); 92 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
90 93
91 if (!nd->renderer) 94 if (!nd->renderer)
92 { 95 {
93 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 96 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
94 nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN); 97 nd->renderer = ector_surface_renderer_factory_new(surface, ECTOR_RENDERER_GRADIENT_RADIAL_MIXIN);
95 efl_domain_current_pop(); 98 efl_domain_current_pop();
96 } 99 }
97 100
98 ector_renderer_transformation_set(nd->renderer, current); 101 ector_renderer_transformation_set(nd->renderer, ctransform);
99 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 102 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
100 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 103 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a);
101 ector_renderer_visibility_set(nd->renderer, nd->visibility); 104 ector_renderer_visibility_set(nd->renderer, nd->visibility);
@@ -104,8 +107,8 @@ _efl_canvas_vg_gradient_radial_render_pre(Eo *obj,
104 efl_gfx_gradient_radial_center_set(nd->renderer, pd->center.x, pd->center.y); 107 efl_gfx_gradient_radial_center_set(nd->renderer, pd->center.x, pd->center.y);
105 efl_gfx_gradient_radial_focal_set(nd->renderer, pd->focal.x, pd->focal.y); 108 efl_gfx_gradient_radial_focal_set(nd->renderer, pd->focal.x, pd->focal.y);
106 efl_gfx_gradient_radial_radius_set(nd->renderer, pd->radius); 109 efl_gfx_gradient_radial_radius_set(nd->renderer, pd->radius);
107
108 ector_renderer_prepare(nd->renderer); 110 ector_renderer_prepare(nd->renderer);
111 ector_renderer_mask_set(nd->renderer, mask, mask_op);
109} 112}
110 113
111static Eo * 114static Eo *
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.c b/src/lib/evas/canvas/efl_canvas_vg_node.c
index e7ef736528..dc2c4a3a09 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_node.c
@@ -66,6 +66,14 @@ _efl_canvas_vg_node_transformation_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_
66} 66}
67 67
68static void 68static void
69_efl_canvas_vg_node_mask_set(Eo *obj EINA_UNUSED,
70 Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED,
71 Efl_Canvas_Vg_Node *mask EINA_UNUSED,
72 int op EINA_UNUSED)
73{
74}
75
76static void
69_efl_canvas_vg_node_origin_set(Eo *obj, 77_efl_canvas_vg_node_origin_set(Eo *obj,
70 Efl_Canvas_Vg_Node_Data *pd, 78 Efl_Canvas_Vg_Node_Data *pd,
71 double x, double y) 79 double x, double y)
@@ -166,25 +174,6 @@ _efl_canvas_vg_node_efl_gfx_color_color_get(const Eo *obj EINA_UNUSED,
166 if (a) *a = pd->a; 174 if (a) *a = pd->a;
167} 175}
168 176
169static void
170_efl_canvas_vg_node_mask_set(Eo *obj EINA_UNUSED,
171 Efl_Canvas_Vg_Node_Data *pd,
172 Efl_VG *r)
173{
174 Efl_VG *tmp = pd->mask;
175
176 pd->mask = efl_ref(r);
177 efl_unref(tmp);
178
179 _efl_canvas_vg_node_changed(obj);
180}
181
182static Efl_VG*
183_efl_canvas_vg_node_mask_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Node_Data *pd)
184{
185 return pd->mask;
186}
187
188static Eina_Size2D 177static Eina_Size2D
189_efl_canvas_vg_node_efl_gfx_entity_size_get(const Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED) 178_efl_canvas_vg_node_efl_gfx_entity_size_get(const Eo *obj, Efl_Canvas_Vg_Node_Data *pd EINA_UNUSED)
190{ 179{
@@ -711,14 +700,6 @@ _efl_canvas_vg_node_efl_gfx_path_interpolate(Eo *obj, Efl_Canvas_Vg_Node_Data *p
711 700
712 pd->visibility = pos_map >= 0.5 ? tod->visibility : fromd->visibility; 701 pd->visibility = pos_map >= 0.5 ? tod->visibility : fromd->visibility;
713 702
714 //Interpolates Mask
715 if (fromd->mask && tod->mask && pd->mask)
716 {
717 if (!efl_gfx_path_interpolate(pd->mask,
718 fromd->mask, tod->mask, pos_map))
719 return EINA_FALSE;
720 }
721
722 _efl_canvas_vg_node_changed(obj); 703 _efl_canvas_vg_node_changed(obj);
723 704
724 return EINA_TRUE; 705 return EINA_TRUE;
@@ -750,12 +731,6 @@ _efl_canvas_vg_node_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Node_Da
750 if (nd->m) memcpy(nd->m, pd->m, sizeof(Eina_Matrix3)); 731 if (nd->m) memcpy(nd->m, pd->m, sizeof(Eina_Matrix3));
751 } 732 }
752 733
753 if (pd->mask)
754 {
755 nd->mask = efl_duplicate(pd->mask);
756 efl_parent_set(nd->mask, node);
757 }
758
759 nd->x = pd->x; 734 nd->x = pd->x;
760 nd->y = pd->y; 735 nd->y = pd->y;
761 nd->r = pd->r; 736 nd->r = pd->r;
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.eo b/src/lib/evas/canvas/efl_canvas_vg_node.eo
index 6b720c2c53..361fe741d7 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_node.eo
@@ -42,13 +42,12 @@ abstract Efl.Canvas.Vg.Node (Efl.Object, Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.
42 } 42 }
43 } 43 }
44 @property mask { 44 @property mask {
45 [[Vector graphics object mask]] 45 [[Set Mask Node to this renderer]]
46 set { 46 set {
47 } 47 }
48 get {
49 }
50 values { 48 values {
51 m: Efl.Canvas.Vg.Node; [[Object mask]] 49 mask: Efl.Canvas.Vg.Node; [[Mask object]]
50 op: int; [[Masking Option. Reserved]]
52 } 51 }
53 } 52 }
54 } 53 }
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index a227c6bd9f..ac45c6d791 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -371,37 +371,71 @@ _efl_canvas_vg_object_efl_object_finalize(Eo *obj, Efl_Canvas_Vg_Object_Data *pd
371 371
372static void 372static void
373_evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd, 373_evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
374 void *engine, void *output, void *context, void *surface, Efl_VG *n, 374 void *engine, void *output, void *context, Efl_VG *node,
375 Eina_Array *clips, Eina_Bool do_async) 375 Eina_Array *clips, Eina_Bool do_async)
376{ 376{
377 if (efl_isa(n, EFL_CANVAS_VG_CONTAINER_CLASS)) 377 if (efl_isa(node, EFL_CANVAS_VG_CONTAINER_CLASS))
378 { 378 {
379 Efl_Canvas_Vg_Container_Data *vc; 379 Efl_Canvas_Vg_Container_Data *cd =
380 efl_data_scope_get(node, EFL_CANVAS_VG_CONTAINER_CLASS);
381
382 //Update Mask Image
383 if (cd->mask_src)
384 {
385 Efl_Canvas_Vg_Container_Data *cd2 =
386 efl_data_scope_get(cd->mask_src, EFL_CANVAS_VG_CONTAINER_CLASS);
387
388 if (cd2->mask.buffer && cd2->mask.dirty)
389 {
390 Ector_Surface *ector = evas_ector_get(obj->layer->evas);
391 if (!ector) return;
392
393 ENFN->ector_end(engine, output, context, ector, EINA_FALSE);
394
395 //Need a better approach.
396 ector_buffer_pixels_set(ector, cd2->mask.pixels, cd2->mask.bound.w, cd2->mask.bound.h, 0,
397 EFL_GFX_COLORSPACE_ARGB8888, EINA_TRUE);
398 ector_surface_reference_point_set(ector, -cd2->mask.bound.x, -cd2->mask.bound.y);
399
400 //Draw Mask Image.
401 Efl_VG *child;
402 Eina_List *l;
403 EINA_LIST_FOREACH(cd2->children, l, child)
404 _evas_vg_render(obj, pd, engine, output, context, child,
405 clips, EINA_FALSE);
406
407 cd2->mask.dirty = EINA_FALSE;
408#if 0
409 FILE *fp = fopen("./test.raw", "w+");
410 fwrite(cd2->mask.pixels, cd2->mask.bound.w * cd2->mask.bound.h, sizeof(uint32_t), fp);
411 fclose(fp);
412 ERR("size = %d x %d", cd2->mask.bound.w, cd2->mask.bound.h);
413#endif
414 //Restore previous ector context
415 ENFN->ector_begin(engine, output, context, ector, 0, 0, EINA_FALSE, do_async);
416 }
417 }
418
419 if (cd->mask.target) return; //Don't draw mask itself.
420
380 Efl_VG *child; 421 Efl_VG *child;
381 Eina_List *l; 422 Eina_List *l;
382 423
383 vc = efl_data_scope_get(n, EFL_CANVAS_VG_CONTAINER_CLASS); 424 EINA_LIST_FOREACH(cd->children, l, child)
384 425 _evas_vg_render(obj, pd, engine, output, context, child, clips, do_async);
385 EINA_LIST_FOREACH(vc->children, l, child)
386 _evas_vg_render(obj, pd,
387 engine, output, context, surface, child,
388 clips, do_async);
389 } 426 }
390 else 427 else
391 { 428 {
392 Efl_Canvas_Vg_Node_Data *nd; 429 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(node, EFL_CANVAS_VG_NODE_CLASS);
393 nd = efl_data_scope_get(n, EFL_CANVAS_VG_NODE_CLASS); 430 ENFN->ector_renderer_draw(engine, output, context, nd->renderer, clips, do_async);
394 obj->layer->evas->engine.func->ector_renderer_draw(engine, output, context, surface, nd->renderer, clips, do_async); 431 if (do_async) eina_array_push(&pd->cleanup, efl_ref(nd->renderer));
395 if (do_async)
396 eina_array_push(&pd->cleanup, efl_ref(nd->renderer));
397 } 432 }
398} 433}
399 434
400//renders a vg_tree to an offscreen buffer and push it to the cache. 435//renders a vg_tree to an offscreen buffer and push it to the cache.
401static void * 436static void *
402_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd, 437_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
403 void *engine, void *surface, 438 void *engine, Efl_VG *root, int w, int h, void *key,
404 Efl_VG *root, int w, int h, void *key,
405 void *buffer, Eina_Bool do_async) 439 void *buffer, Eina_Bool do_async)
406{ 440{
407 Ector_Surface *ector; 441 Ector_Surface *ector;
@@ -420,29 +454,24 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
420 buffer_created = EINA_TRUE; 454 buffer_created = EINA_TRUE;
421 } 455 }
422 456
423 _evas_vg_render_pre(root, ector, NULL); 457 _evas_vg_render_pre(obj, root, ector, NULL, NULL, 0);
424 458
425 //initialize buffer 459 //initialize buffer
426 context = evas_common_draw_context_new(); 460 context = evas_common_draw_context_new();
427 evas_common_draw_context_set_render_op(context, _EVAS_RENDER_COPY); 461 evas_common_draw_context_set_render_op(context, _EVAS_RENDER_COPY);
428 evas_common_draw_context_set_color(context, 255, 255, 255, 255); 462 evas_common_draw_context_set_color(context, 255, 255, 255, 255);
429 obj->layer->evas->engine.func->ector_begin(engine, buffer, 463
430 context, surface, 464 ENFN->ector_begin(engine, buffer, context, ector, 0, 0, EINA_TRUE, do_async);
431 ector, 465
432 0, 0,
433 do_async);
434 //draw on buffer 466 //draw on buffer
435 _evas_vg_render(obj, pd, 467 _evas_vg_render(obj, pd,
436 engine, buffer, 468 engine, buffer,
437 context, surface, 469 context, root,
438 root, NULL, 470 NULL,
439 do_async); 471 do_async);
440 472
441 obj->layer->evas->engine.func->image_dirty_region(engine, buffer, 0, 0, w, h); 473 ENFN->image_dirty_region(engine, buffer, 0, 0, w, h);
442 obj->layer->evas->engine.func->ector_end(engine, buffer, 474 ENFN->ector_end(engine, buffer, context, ector, do_async);
443 context, surface,
444 ector,do_async);
445
446 evas_common_draw_context_free(context); 475 evas_common_draw_context_free(context);
447 476
448 if (buffer_created) 477 if (buffer_created)
@@ -498,7 +527,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
498 void *buffer = ENFN->ector_surface_cache_get(engine, root); 527 void *buffer = ENFN->ector_surface_cache_get(engine, root);
499 528
500 if (!buffer) 529 if (!buffer)
501 buffer = _render_to_buffer(obj, pd, engine, surface, root, w, h, root, NULL, 530 buffer = _render_to_buffer(obj, pd, engine, root, w, h, root, NULL,
502 do_async); 531 do_async);
503 else 532 else
504 //cache reference was increased when we get the cache. 533 //cache reference was increased when we get the cache.
@@ -534,20 +563,15 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
534 if (!buffer) 563 if (!buffer)
535 { 564 {
536 // render to the buffer 565 // render to the buffer
537 buffer = _render_to_buffer(obj, pd, 566 buffer = _render_to_buffer(obj, pd, engine, user_entry->root,
538 engine, surface, 567 w, h, user_entry, buffer,
539 user_entry->root,
540 w, h,
541 user_entry,
542 buffer,
543 do_async); 568 do_async);
544 } 569 }
545 else 570 else
546 { 571 {
547 // render to the buffer 572 // render to the buffer
548 if (pd->changed) 573 if (pd->changed)
549 buffer = _render_to_buffer(obj, pd, 574 buffer = _render_to_buffer(obj, pd, engine,
550 engine, surface,
551 user_entry->root, 575 user_entry->root,
552 w, h, 576 w, h,
553 user_entry, 577 user_entry,
@@ -630,7 +654,7 @@ _efl_canvas_vg_object_render_pre(Evas_Object *eo_obj,
630 // FIXME: handle damage only on changed renderer. 654 // FIXME: handle damage only on changed renderer.
631 s = evas_ector_get(obj->layer->evas); 655 s = evas_ector_get(obj->layer->evas);
632 if (pd->root && s) 656 if (pd->root && s)
633 _evas_vg_render_pre(pd->root, s, NULL); 657 _evas_vg_render_pre(obj, pd->root, s, NULL, NULL, 0);
634 658
635 /* now figure what changed and add draw rects */ 659 /* now figure what changed and add draw rects */
636 /* if it just became visible or invisible */ 660 /* if it just became visible or invisible */
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c
index d55009afcb..106efeccfb 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c
@@ -78,43 +78,45 @@ _efl_canvas_vg_shape_stroke_marker_get(const Eo *obj EINA_UNUSED,
78} 78}
79 79
80static void 80static void
81_efl_canvas_vg_shape_render_pre(Eo *obj EINA_UNUSED, 81_efl_canvas_vg_shape_render_pre(Evas_Object_Protected_Data *vg_pd,
82 Eina_Matrix3 *parent, 82 Efl_VG *obj,
83 Ector_Surface *s, 83 Efl_Canvas_Vg_Node_Data *nd,
84 void *data, 84 Ector_Surface *surface,
85 Efl_Canvas_Vg_Node_Data *nd) 85 Eina_Matrix3 *ptransform,
86 Ector_Buffer *mask,
87 int mask_op,
88 void *data)
86{ 89{
87 Efl_Canvas_Vg_Shape_Data *pd = data; 90 Efl_Canvas_Vg_Shape_Data *pd = data;
88 Efl_Canvas_Vg_Node_Data *fill, *stroke_fill, *stroke_marker, *mask; 91 Efl_Canvas_Vg_Node_Data *fill, *stroke_fill, *stroke_marker;
89 92
90 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return; 93 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return;
91 94
92 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 95 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
93 96
94 EFL_CANVAS_VG_COMPUTE_MATRIX(current, parent, nd); 97 EFL_CANVAS_VG_COMPUTE_MATRIX(ctransform, ptransform, nd);
95 98
96 fill = _evas_vg_render_pre(pd->fill, s, current); 99 fill = _evas_vg_render_pre(vg_pd, pd->fill, surface, ctransform, mask, mask_op);
97 stroke_fill = _evas_vg_render_pre(pd->stroke.fill, s, current); 100 stroke_fill = _evas_vg_render_pre(vg_pd, pd->stroke.fill, surface, ctransform, mask, mask_op);
98 stroke_marker = _evas_vg_render_pre(pd->stroke.marker, s, current); 101 stroke_marker = _evas_vg_render_pre(vg_pd, pd->stroke.marker, surface, ctransform, mask, mask_op);
99 mask = _evas_vg_render_pre(nd->mask, s, current);
100 102
101 if (!nd->renderer) 103 if (!nd->renderer)
102 { 104 {
103 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 105 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
104 nd->renderer = ector_surface_renderer_factory_new(s, ECTOR_RENDERER_SHAPE_MIXIN); 106 nd->renderer = ector_surface_renderer_factory_new(surface, ECTOR_RENDERER_SHAPE_MIXIN);
105 efl_domain_current_pop(); 107 efl_domain_current_pop();
106 } 108 }
107 109 ector_renderer_transformation_set(nd->renderer, ctransform);
108 ector_renderer_transformation_set(nd->renderer, current);
109 ector_renderer_origin_set(nd->renderer, nd->x, nd->y); 110 ector_renderer_origin_set(nd->renderer, nd->x, nd->y);
110 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a); 111 ector_renderer_color_set(nd->renderer, nd->r, nd->g, nd->b, nd->a);
111 ector_renderer_visibility_set(nd->renderer, nd->visibility); 112 ector_renderer_visibility_set(nd->renderer, nd->visibility);
112 ector_renderer_mask_set(nd->renderer, mask ? mask->renderer : NULL);
113 ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL); 113 ector_renderer_shape_fill_set(nd->renderer, fill ? fill->renderer : NULL);
114 ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL); 114 ector_renderer_shape_stroke_fill_set(nd->renderer, stroke_fill ? stroke_fill->renderer : NULL);
115 ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL); 115 ector_renderer_shape_stroke_marker_set(nd->renderer, stroke_marker ? stroke_marker->renderer : NULL);
116 efl_gfx_path_copy_from(nd->renderer, obj); 116 efl_gfx_path_copy_from(nd->renderer, obj);
117 ector_renderer_prepare(nd->renderer); 117 ector_renderer_prepare(nd->renderer);
118 ector_renderer_mask_set(nd->renderer, mask, mask_op);
119
118} 120}
119 121
120static Eo * 122static Eo *
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index a4d11d06cb..10b8b49b25 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -57,12 +57,13 @@ struct _Efl_Canvas_Vg_Node_Data
57 Eina_Matrix3 *m; 57 Eina_Matrix3 *m;
58 Efl_Canvas_Vg_Interpolation *intp; 58 Efl_Canvas_Vg_Interpolation *intp;
59 59
60 Efl_Canvas_Vg_Node *mask;
61 Ector_Renderer *renderer; 60 Ector_Renderer *renderer;
62 61
63 Efl_VG *vg_obj; //...Not necessary!! 62 Efl_VG *vg_obj; //...Not necessary!!
64 63
65 void (*render_pre)(Eo *obj, Eina_Matrix3 *parent, Ector_Surface *s, void *data, Efl_Canvas_Vg_Node_Data *nd); 64 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node,
65 Efl_Canvas_Vg_Node_Data *nd, Ector_Surface *surface,
66 Eina_Matrix3 *ptransform, Ector_Buffer *mask, int mask_op, void *data);
66 void *data; 67 void *data;
67 68
68 double x, y; 69 double x, y;
@@ -74,11 +75,25 @@ struct _Efl_Canvas_Vg_Node_Data
74 Eina_Bool parenting : 1; 75 Eina_Bool parenting : 1;
75}; 76};
76 77
78typedef struct _Vg_Mask
79{
80 Evas_Object_Protected_Data *vg_pd; //Vector Object (for accessing backend engine)
81 Ector_Buffer *buffer; //Mask Ector Buffer
82 void *pixels; //Mask pixel buffer (actual data)
83 Eina_Rect bound; //Mask boundary
84 Eina_List *target; //Mask target
85 int option; //Mask option
86 Eina_Bool dirty : 1; //Need to update mask image.
87} Vg_Mask;
88
77struct _Efl_Canvas_Vg_Container_Data 89struct _Efl_Canvas_Vg_Container_Data
78{ 90{
79 Eina_List *children; 91 Eina_List *children;
80
81 Eina_Hash *names; 92 Eina_Hash *names;
93
94 //Masking feature.
95 Efl_Canvas_Vg_Node *mask_src; //Mask Source
96 Vg_Mask mask; //Mask source data
82}; 97};
83 98
84struct _Efl_Canvas_Vg_Gradient_Data 99struct _Efl_Canvas_Vg_Gradient_Data
@@ -112,13 +127,12 @@ Eina_Bool evas_cache_vg_entry_file_save(Vg_Cache_Entry *vg_ent
112void efl_canvas_vg_node_root_set(Efl_VG *node, Efl_VG *vg_obj); 127void efl_canvas_vg_node_root_set(Efl_VG *node, Efl_VG *vg_obj);
113 128
114static inline Efl_Canvas_Vg_Node_Data * 129static inline Efl_Canvas_Vg_Node_Data *
115_evas_vg_render_pre(Efl_VG *child, Ector_Surface *s, Eina_Matrix3 *m) 130_evas_vg_render_pre(Evas_Object_Protected_Data *vg_pd, Efl_VG *child, Ector_Surface *surface, Eina_Matrix3 *transform, Ector_Buffer *mask, int mask_op)
116{ 131{
117 if (!child) return NULL; 132 if (!child) return NULL;
118 133 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
119 Efl_Canvas_Vg_Node_Data *child_nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS); 134 if (nd) nd->render_pre(vg_pd, child, nd, surface, transform, mask, mask_op, nd->data);
120 if (child_nd) child_nd->render_pre(child, m, s, child_nd->data, child_nd); 135 return nd;
121 return child_nd;
122} 136}
123 137
124static inline void 138static inline void
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 34dffee36b..3d5020fdd6 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1482,9 +1482,9 @@ struct _Evas_Func
1482 void (*ector_destroy) (void *engine, Ector_Surface *surface); 1482 void (*ector_destroy) (void *engine, Ector_Surface *surface);
1483 Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image); 1483 Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image);
1484 Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags); 1484 Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags);
1485 void (*ector_begin) (void *engine, void *output, void *context, void *surface, Ector_Surface *ector, int x, int y, Eina_Bool do_async); 1485 void (*ector_begin) (void *engine, void *output, void *context, Ector_Surface *ector, int x, int y, Eina_Bool clear, Eina_Bool do_async);
1486 void (*ector_renderer_draw) (void *engine, void *output, void *context, void *surface, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async); 1486 void (*ector_renderer_draw) (void *engine, void *output, void *context, Ector_Renderer *r, Eina_Array *clips, Eina_Bool do_async);
1487 void (*ector_end) (void *engine, void *output, void *context, void *surface, Ector_Surface *ector, Eina_Bool do_async); 1487 void (*ector_end) (void *engine, void *output, void *context, Ector_Surface *ector, Eina_Bool do_async);
1488 1488
1489 void *(*ector_surface_create) (void *engine, int w, int h, int *error); 1489 void *(*ector_surface_create) (void *engine, int w, int h, int *error);
1490 void (*ector_surface_destroy) (void *engine, void *surface); 1490 void (*ector_surface_destroy) (void *engine, void *surface);