summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_private.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:22:58 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:22:58 +0200
commit6097178ec32f56edf2a737a701ed55b673c29879 (patch)
treea994152d4397f3f889d4fd6133addc730fb88363 /src/lib/evas/canvas/evas_vg_private.h
parent621d3b566024c357ce523857db211ab02a08af72 (diff)
evas: start properly implementing render_pre for Evas_VG_Node.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_private.h')
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 6b83623517..7d8f0691f4 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -1,14 +1,19 @@
1#ifndef EVAS_VG_PRIVATE_H_ 1#ifndef EVAS_VG_PRIVATE_H_
2# define EVAS_VG_PRIVATE_H_ 2# define EVAS_VG_PRIVATE_H_
3 3
4#include <Ector.h>
5
4typedef struct _Evas_VG_Node_Data Evas_VG_Node_Data; 6typedef struct _Evas_VG_Node_Data Evas_VG_Node_Data;
7typedef struct _Evas_VG_Container_Data Evas_VG_Container_Data;
8typedef struct _Evas_VG_Gradient_Data Evas_VG_Gradient_Data;
9
5struct _Evas_VG_Node_Data 10struct _Evas_VG_Node_Data
6{ 11{
7 Eina_Matrix3 *m; 12 Eina_Matrix3 *m;
8 Evas_VG_Node *mask; 13 Evas_VG_Node *mask;
14 Ector_Renderer *renderer;
9 15
10 void (*render_pre)(void); 16 void (*render_pre)(Eo *obj, Ector_Surface *s, void *data, Evas_VG_Node_Data *nd);
11 void (*render)(void);
12 void *data; 17 void *data;
13 18
14 double x, y; 19 double x, y;
@@ -18,10 +23,28 @@ struct _Evas_VG_Node_Data
18 Eina_Bool changed : 1; 23 Eina_Bool changed : 1;
19}; 24};
20 25
21typedef struct _Evas_VG_Container_Data Evas_VG_Container_Data;
22struct _Evas_VG_Container_Data 26struct _Evas_VG_Container_Data
23{ 27{
24 Eina_List *children; 28 Eina_List *children;
25}; 29};
26 30
31struct _Evas_VG_Gradient_Data
32{
33 // FIXME: Later on we should deduplicate it somehow (Using Ector ?).
34 Efl_Graphics_Gradient_Stop *colors;
35 unsigned int colors_count;
36
37 Efl_Graphics_Gradient_Spread s;
38};
39
40static inline void
41_evas_vg_render_pre(Evas_VG_Node *child, Ector_Surface *s)
42{
43 Evas_VG_Node_Data *child_nd;
44
45 // FIXME: Prevent infinite loop
46 child_nd = eo_data_scope_get(child, EVAS_VG_NODE_CLASS);
47 child_nd->render_pre(child, s, child_nd->data, child_nd);
48}
49
27#endif 50#endif