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:23:03 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-04-03 16:23:03 +0200
commit502ac459162589e95c57fa0ede376159044d4278 (patch)
treef883d8544c0b5c6e7b67c7b686be83b2fee496e0 /src/lib/evas/canvas/evas_vg_private.h
parent0bb66ffedf7eff7b6da897a061ac158e310bb811 (diff)
evas: properly propagate Eina_Matrix from the VG scene graph to the Ector_Renderer.
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_private.h')
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 7d8f0691f4..80f8fe5e5b 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -13,7 +13,7 @@ struct _Evas_VG_Node_Data
13 Evas_VG_Node *mask; 13 Evas_VG_Node *mask;
14 Ector_Renderer *renderer; 14 Ector_Renderer *renderer;
15 15
16 void (*render_pre)(Eo *obj, Ector_Surface *s, void *data, Evas_VG_Node_Data *nd); 16 void (*render_pre)(Eo *obj, Eina_Matrix3 *parent, Ector_Surface *s, void *data, Evas_VG_Node_Data *nd);
17 void *data; 17 void *data;
18 18
19 double x, y; 19 double x, y;
@@ -38,13 +38,31 @@ struct _Evas_VG_Gradient_Data
38}; 38};
39 39
40static inline void 40static inline void
41_evas_vg_render_pre(Evas_VG_Node *child, Ector_Surface *s) 41_evas_vg_render_pre(Evas_VG_Node *child, Ector_Surface *s, Eina_Matrix3 *m)
42{ 42{
43 Evas_VG_Node_Data *child_nd; 43 Evas_VG_Node_Data *child_nd;
44 44
45 // FIXME: Prevent infinite loop 45 // FIXME: Prevent infinite loop
46 child_nd = eo_data_scope_get(child, EVAS_VG_NODE_CLASS); 46 child_nd = eo_data_scope_get(child, EVAS_VG_NODE_CLASS);
47 child_nd->render_pre(child, s, child_nd->data, child_nd); 47 child_nd->render_pre(child, m, s, child_nd->data, child_nd);
48} 48}
49 49
50#define EVAS_VG_COMPUTE_MATRIX(Current, Parent, Nd) \
51 Eina_Matrix3 *Current = Nd->m; \
52 Eina_Matrix3 _matrix_tmp; \
53 \
54 if (Parent) \
55 { \
56 if (Current) \
57 { \
58 eina_matrix3_compose(Parent, Current, &_matrix_tmp); \
59 Current = &_matrix_tmp; \
60 } \
61 else \
62 { \
63 Current = Parent; \
64 } \
65 }
66
67
50#endif 68#endif