summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_container.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-11-14 21:50:50 +0900
committerHermet Park <hermetpark@gmail.com>2018-11-14 21:50:50 +0900
commite2cd8eea55c339d1ab96524113f5452a414957d5 (patch)
treede82f6a93181756600c67233e1ee42f8ace06293 /src/lib/evas/canvas/evas_vg_container.c
parent09da85807a6447d6e9c04fc72fdb485a78192d82 (diff)
evas vg: optimize gradient sequences.
Summary: 1. Pointed out gradient prepare step triggered duplicatedly, because they are immediate children of container. But gradients is desigend to fill shape, shape could get ready of the gradients which are applied to. So, container doesn't need to prepare gradient children. 2. Ector shape does prepare its gradient renderer in it's prepare time, each gradients objects doesn't need to prepare renderer separately. Here code skip duplication of sequences of gradients preparation step. by cleaning up logic. Reviewers: #committers Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7269
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_container.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index 367a3c9..ccb8bfb 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -35,7 +35,7 @@ _efl_canvas_vg_container_render_pre(Eo *obj EINA_UNUSED,
35 Efl_Canvas_Vg_Node_Data *child_nd; 35 Efl_Canvas_Vg_Node_Data *child_nd;
36 Efl_Gfx_Change_Flag flag; 36 Efl_Gfx_Change_Flag flag;
37 37
38 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return ; 38 if (nd->flags == EFL_GFX_CHANGE_FLAG_NONE) return;
39 39
40 flag = nd->flags; 40 flag = nd->flags;
41 nd->flags = EFL_GFX_CHANGE_FLAG_NONE; 41 nd->flags = EFL_GFX_CHANGE_FLAG_NONE;
@@ -44,6 +44,10 @@ _efl_canvas_vg_container_render_pre(Eo *obj EINA_UNUSED,
44 44
45 EINA_LIST_FOREACH(pd->children, l, child) 45 EINA_LIST_FOREACH(pd->children, l, child)
46 { 46 {
47 //Skip Gradients. they will be updated by Shape.
48 if (efl_isa(child, EFL_CANVAS_VG_GRADIENT_CLASS))
49 continue;
50
47 if (flag & EFL_GFX_CHANGE_FLAG_MATRIX) 51 if (flag & EFL_GFX_CHANGE_FLAG_MATRIX)
48 { 52 {
49 child_nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS); 53 child_nd = efl_data_scope_get(child, EFL_CANVAS_VG_NODE_CLASS);