forked from enlightenment/efl
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
This commit is contained in:
parent
725219e319
commit
53e8bf9dab
|
@ -192,6 +192,14 @@ _efl_canvas_vg_container_render_pre(Evas_Object_Protected_Data *vg_pd,
|
|||
ptransform, ctransform, p_opacity, c_a, comp, comp_method);
|
||||
}
|
||||
|
||||
//If the container has transparency, it internally alpha blends with ector buffer.
|
||||
//So ector buffer must be created synchronously.
|
||||
if (c_a < 255 && vg_pd && vg_pd->object)
|
||||
{
|
||||
Efl_Canvas_Vg_Object_Data *od = efl_data_scope_get(vg_pd->object, EFL_CANVAS_VG_OBJECT_CLASS);
|
||||
od->sync_render = EINA_TRUE;
|
||||
}
|
||||
|
||||
EINA_LIST_FOREACH(pd->children, l, child)
|
||||
{
|
||||
//Don't need to update composite nodes.
|
||||
|
|
|
@ -389,6 +389,8 @@ _efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Da
|
|||
pd->obj = obj;
|
||||
pd->root = efl_add_ref(EFL_CANVAS_VG_CONTAINER_CLASS, NULL);
|
||||
|
||||
pd->sync_render = EINA_FALSE;
|
||||
|
||||
eina_array_step_set(&pd->cleanup, sizeof(pd->cleanup), 8);
|
||||
|
||||
return eo_obj;
|
||||
|
@ -537,6 +539,8 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
|
|||
//ector begin - end for drawing composite images.
|
||||
_evas_vg_render_pre(obj, root, engine, buffer, context, ector, NULL, 255, NULL, 0);
|
||||
|
||||
if (pd->sync_render) do_async = EINA_FALSE;
|
||||
|
||||
//Actual content drawing
|
||||
if (!ENFN->ector_begin(engine, buffer, context, ector, x, y, do_async))
|
||||
{
|
||||
|
|
|
@ -55,6 +55,7 @@ struct _Efl_Canvas_Vg_Object_Data
|
|||
void *ckeys[2]; //cache keys for first, last frames if animation
|
||||
|
||||
Eina_Bool changed : 1;
|
||||
Eina_Bool sync_render : 1;
|
||||
};
|
||||
|
||||
struct _Efl_Canvas_Vg_Node_Data
|
||||
|
|
Loading…
Reference in New Issue