summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_private.h
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-08-20 18:18:31 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-20 18:23:41 +0900
commitdad166f84a02cfffc2a07bc804e7b7e35ed4a40d (patch)
treeb52d551fa4fdb4adda62059f59f0ada461246cb4 /src/lib/evas/canvas/evas_vg_private.h
parentead8a280570baded69686487a6dd27a8843fc95f (diff)
ector: code refactoring.
Current vector drawing requires several methods for compositing, it's shouldnt have only masking but other blending functions such as matte in lottie, porter&duff in android, etc. Previously we didn't specify this method name, just reserved the options and now we started to define the methods with ector_renderer_composite_method() instead of mask_set().
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_private.h')
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 0fad40d15c..6b226fa85f 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -67,7 +67,7 @@ struct _Efl_Canvas_Vg_Node_Data
67 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node, 67 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node,
68 Efl_Canvas_Vg_Node_Data *nd, 68 Efl_Canvas_Vg_Node_Data *nd,
69 void *engine, void *output, void *contenxt, Ector_Surface *surface, 69 void *engine, void *output, void *contenxt, Ector_Surface *surface,
70 Eina_Matrix3 *ptransform, Ector_Buffer *mask, int mask_op, void *data); 70 Eina_Matrix3 *ptransform, Ector_Buffer *comp, Ector_Renderer_Composite_Method comp_method, void *data);
71 void *data; 71 void *data;
72 72
73 double x, y; 73 double x, y;
@@ -78,24 +78,24 @@ struct _Efl_Canvas_Vg_Node_Data
78 Eina_Bool changed : 1; 78 Eina_Bool changed : 1;
79}; 79};
80 80
81typedef struct _Vg_Mask 81typedef struct _Vg_Composite
82{ 82{
83 Evas_Object_Protected_Data *vg_pd; //Vector Object (for accessing backend engine) 83 Evas_Object_Protected_Data *vg_pd; //Vector Object (for accessing backend engine)
84 Ector_Buffer *buffer; //Mask Ector Buffer 84 Ector_Buffer *buffer; //Composite Ector Buffer
85 void *pixels; //Mask pixel buffer (actual data) 85 void *pixels; //Composite pixel buffer (actual data)
86 Eina_Rect bound; //Mask boundary 86 Eina_Rect bound; //Composite boundary
87 Eina_List *target; //Mask target 87 Eina_List *src; //Composite Sources
88 int option; //Mask option 88 Ector_Renderer_Composite_Method method; //Composite Method
89} Vg_Mask; 89} Vg_Comp;
90 90
91struct _Efl_Canvas_Vg_Container_Data 91struct _Efl_Canvas_Vg_Container_Data
92{ 92{
93 Eina_List *children; 93 Eina_List *children;
94 Eina_Hash *names; 94 Eina_Hash *names;
95 95
96 //Masking feature. 96 //Composite feature.
97 Efl_Canvas_Vg_Node *mask_src; //Mask Source 97 Efl_Canvas_Vg_Node *comp_target; //Composite target
98 Vg_Mask mask; //Mask source data 98 Vg_Comp comp; //Composite target data
99 99
100 //Layer transparency feature. This buffer is only valid when the layer has transparency. 100 //Layer transparency feature. This buffer is only valid when the layer has transparency.
101 Ector_Buffer *blend_buffer; 101 Ector_Buffer *blend_buffer;
@@ -150,13 +150,13 @@ _evas_vg_render_pre(Evas_Object_Protected_Data *vg_pd, Efl_VG *child,
150 void *engine, void *output, void *context, 150 void *engine, void *output, void *context,
151 Ector_Surface *surface, 151 Ector_Surface *surface,
152 Eina_Matrix3 *transform, 152 Eina_Matrix3 *transform,
153 Ector_Buffer *mask, int mask_op) 153 Ector_Buffer *comp, Ector_Renderer_Composite_Method comp_method)
154{ 154{
155 if (!child) return NULL; 155 if (!child) return NULL;
156 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS); 156 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
157 if (nd) nd->render_pre(vg_pd, child, nd, 157 if (nd) nd->render_pre(vg_pd, child, nd,
158 engine, output, context, surface, 158 engine, output, context, surface,
159 transform, mask, mask_op, nd->data); 159 transform, comp, comp_method, nd->data);
160 return nd; 160 return nd;
161} 161}
162 162