summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_private.h
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-01-28 16:53:42 +0900
committerHermet Park <hermetpark@gmail.com>2019-01-28 16:57:56 +0900
commitda36a87bb30170f8235fc9d6b464d92000681681 (patch)
treeb980513f48f82e8c82e2ce735029dc30e7ec47b9 /src/lib/evas/canvas/evas_vg_private.h
parentc03f272becfab7c7eefeba49b9da99f75afa5976 (diff)
evas vg: improve masking render logic.
Previous masking image is generated on vg rendering time, though context is changed to main vg rendering to masking, This had a issue that ector context switching which is not allowed in software backend because of asynchronou method. Now, this improvment brings the masking rendering move to vg render pre step with synchronous rendering method, then use the masking surface in the main vg rendering.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index fa122fa587..904c42506c 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -64,7 +64,8 @@ struct _Efl_Canvas_Vg_Node_Data
64 Efl_Canvas_Vg_Object_Data *vd; 64 Efl_Canvas_Vg_Object_Data *vd;
65 65
66 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node, 66 void (*render_pre)(Evas_Object_Protected_Data *vg_pd, Efl_VG *node,
67 Efl_Canvas_Vg_Node_Data *nd, Ector_Surface *surface, 67 Efl_Canvas_Vg_Node_Data *nd,
68 void *engine, void *output, void *contenxt, Ector_Surface *surface,
68 Eina_Matrix3 *ptransform, Ector_Buffer *mask, int mask_op, void *data); 69 Eina_Matrix3 *ptransform, Ector_Buffer *mask, int mask_op, void *data);
69 void *data; 70 void *data;
70 71
@@ -84,7 +85,6 @@ typedef struct _Vg_Mask
84 Eina_Rect bound; //Mask boundary 85 Eina_Rect bound; //Mask boundary
85 Eina_List *target; //Mask target 86 Eina_List *target; //Mask target
86 int option; //Mask option 87 int option; //Mask option
87 Eina_Bool dirty : 1; //Need to update mask image.
88} Vg_Mask; 88} Vg_Mask;
89 89
90struct _Efl_Canvas_Vg_Container_Data 90struct _Efl_Canvas_Vg_Container_Data
@@ -138,11 +138,17 @@ efl_canvas_vg_object_change(Efl_Canvas_Vg_Object_Data *vd)
138} 138}
139 139
140static inline Efl_Canvas_Vg_Node_Data * 140static inline Efl_Canvas_Vg_Node_Data *
141_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) 141_evas_vg_render_pre(Evas_Object_Protected_Data *vg_pd, Efl_VG *child,
142 void *engine, void *output, void *context,
143 Ector_Surface *surface,
144 Eina_Matrix3 *transform,
145 Ector_Buffer *mask, int mask_op)
142{ 146{
143 if (!child) return NULL; 147 if (!child) return NULL;
144 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS); 148 Efl_Canvas_Vg_Node_Data *nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);
145 if (nd) nd->render_pre(vg_pd, child, nd, surface, transform, mask, mask_op, nd->data); 149 if (nd) nd->render_pre(vg_pd, child, nd,
150 engine, output, context, surface,
151 transform, mask, mask_op, nd->data);
146 return nd; 152 return nd;
147} 153}
148 154