summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-09-11 17:02:23 +0900
committerHermet Park <chuneon.park@samsung.com>2020-09-11 17:02:24 +0900
commit53e8bf9dab80070d6f9b088f92969eac73a71568 (patch)
tree53b4d1db3af036e1286e757d8599999d6e7a0858 /src/lib/evas
parent725219e31980a377444a9088a7dbadf438300acf (diff)
Efl.Canvas.Vg: When VG container has transparency, ector buffer created synchronously
Summary: If the container has transparency, it internally alpha blends with ector buffer. So ector buffer must be created synchronously. Test Plan: N/A Reviewers: Hermet, smohanty Reviewed By: Hermet Subscribers: #reviewers, #committers, cedric, herb, kimcinoo Tags: #efl Differential Revision: https://phab.enlightenment.org/D12140
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c8
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c4
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index 4516b34ba0..7dea6945ef 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -192,6 +192,14 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
192 ptransform, ctransform, p_opacity, c_a, comp, comp_method); 192 ptransform, ctransform, p_opacity, c_a, comp, comp_method);
193 } 193 }
194 194
195 //If the container has transparency, it internally alpha blends with ector buffer.
196 //So ector buffer must be created synchronously.
197 if (c_a < 255 && vg_pd && vg_pd->object)
198 {
199 Efl_Canvas_Vg_Object_Data *od = efl_data_scope_get(vg_pd->object, EFL_CANVAS_VG_OBJECT_CLASS);
200 od->sync_render = EINA_TRUE;
201 }
202
195 EINA_LIST_FOREACH(pd->children, l, child) 203 EINA_LIST_FOREACH(pd->children, l, child)
196 { 204 {
197 //Don't need to update composite nodes. 205 //Don't need to update composite nodes.
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 72b934b113..1c49ac5ac1 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -389,6 +389,8 @@ _efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Da
389 pd->obj = obj; 389 pd->obj = obj;
390 pd->root = efl_add_ref(EFL_CANVAS_VG_CONTAINER_CLASS, NULL); 390 pd->root = efl_add_ref(EFL_CANVAS_VG_CONTAINER_CLASS, NULL);
391 391
392 pd->sync_render = EINA_FALSE;
393
392 eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8); 394 eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);
393 395
394 return eo_obj; 396 return eo_obj;
@@ -537,6 +539,8 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
537 //ector begin - end for drawing composite images. 539 //ector begin - end for drawing composite images.
538 _evas_vg_render_pre(obj, root, engine, buffer, context, ector, NULL, 255, NULL, 0); 540 _evas_vg_render_pre(obj, root, engine, buffer, context, ector, NULL, 255, NULL, 0);
539 541
542 if (pd->sync_render) do_async = EINA_FALSE;
543
540 //Actual content drawing 544 //Actual content drawing
541 if (!ENFN->ector_begin(engine, buffer, context, ector, x, y, do_async)) 545 if (!ENFN->ector_begin(engine, buffer, context, ector, x, y, do_async))
542 { 546 {
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 2431722b46..beb5854253 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -55,6 +55,7 @@ struct _Efl_Canvas_Vg_Object_Data
55 void *ckeys[2]; //cache keys for first, last frames if animation 55 void *ckeys[2]; //cache keys for first, last frames if animation
56 56
57 Eina_Bool changed : 1; 57 Eina_Bool changed : 1;
58 Eina_Bool sync_render : 1;
58}; 59};
59 60
60struct _Efl_Canvas_Vg_Node_Data 61struct _Efl_Canvas_Vg_Node_Data