forked from enlightenment/efl
evas: do not use default output or any other during render pre.
This commit is contained in:
parent
68b846c1f4
commit
a0c58276c3
|
@ -378,6 +378,8 @@ next_zombie:
|
||||||
evas_event_callback_all_del(eo_e);
|
evas_event_callback_all_del(eo_e);
|
||||||
evas_event_callback_cleanup(eo_e);
|
evas_event_callback_cleanup(eo_e);
|
||||||
|
|
||||||
|
/* Ector surface may require an existing output to finish its job */
|
||||||
|
e->engine.func->ector_destroy(_evas_engine_context(e), e->ector);
|
||||||
/* cleanup engine backend */
|
/* cleanup engine backend */
|
||||||
EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
|
EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
|
||||||
e->engine.func->engine_free(e->backend);
|
e->engine.func->engine_free(e->backend);
|
||||||
|
@ -842,19 +844,11 @@ _evas_canvas_efl_loop_user_loop_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e EI
|
||||||
}
|
}
|
||||||
|
|
||||||
Ector_Surface *
|
Ector_Surface *
|
||||||
evas_ector_get(Evas_Public_Data *e, void *output)
|
evas_ector_get(Evas_Public_Data *e)
|
||||||
{
|
{
|
||||||
Efl_Canvas_Output *r;
|
if (!e->ector)
|
||||||
Eina_List *l;
|
e->ector = e->engine.func->ector_create(_evas_engine_context(e));
|
||||||
|
return e->ector;
|
||||||
EINA_LIST_FOREACH(e->outputs, l, r)
|
|
||||||
if (r->output == output)
|
|
||||||
{
|
|
||||||
if (!r->ector)
|
|
||||||
r->ector = e->engine.func->ector_create(_evas_engine_context(e), output);
|
|
||||||
return r->ector;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_BiDi_Direction
|
EAPI Evas_BiDi_Direction
|
||||||
|
|
|
@ -178,7 +178,7 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
|
||||||
int x, int y, Eina_Bool do_async)
|
int x, int y, Eina_Bool do_async)
|
||||||
{
|
{
|
||||||
Evas_VG_Data *vd = type_private_data;
|
Evas_VG_Data *vd = type_private_data;
|
||||||
Ector_Surface *ector = evas_ector_get(obj->layer->evas, output);
|
Ector_Surface *ector = evas_ector_get(obj->layer->evas);
|
||||||
// FIXME: Set context (that should affect Ector_Surface) and
|
// FIXME: Set context (that should affect Ector_Surface) and
|
||||||
// then call Ector_Renderer render from bottom to top. Get the
|
// then call Ector_Renderer render from bottom to top. Get the
|
||||||
// Ector_Surface that match the output from Evas engine API.
|
// Ector_Surface that match the output from Evas engine API.
|
||||||
|
@ -248,7 +248,7 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: handle damage only on changed renderer.
|
// FIXME: handle damage only on changed renderer.
|
||||||
s = evas_ector_get(obj->layer->evas, _evas_default_output_get(obj->layer->evas));
|
s = evas_ector_get(obj->layer->evas);
|
||||||
if (vd->root && s)
|
if (vd->root && s)
|
||||||
_evas_vg_render_pre(vd->root, s, NULL);
|
_evas_vg_render_pre(vd->root, s, NULL);
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,6 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
|
||||||
|
|
||||||
if (e->engine.func)
|
if (e->engine.func)
|
||||||
{
|
{
|
||||||
e->engine.func->ector_destroy(_evas_engine_context(e),
|
|
||||||
output->ector);
|
|
||||||
e->engine.func->output_free(_evas_engine_context(e),
|
e->engine.func->output_free(_evas_engine_context(e),
|
||||||
output->output);
|
output->output);
|
||||||
free(output->info);
|
free(output->info);
|
||||||
|
|
|
@ -964,6 +964,7 @@ struct _Evas_Public_Data
|
||||||
Eina_Array *cur_device;
|
Eina_Array *cur_device;
|
||||||
|
|
||||||
void *backend;
|
void *backend;
|
||||||
|
Ector_Surface *ector;
|
||||||
Eina_List *outputs;
|
Eina_List *outputs;
|
||||||
|
|
||||||
Evas_Device *default_seat;
|
Evas_Device *default_seat;
|
||||||
|
@ -1333,8 +1334,6 @@ struct _Efl_Canvas_Output
|
||||||
{
|
{
|
||||||
Eo *canvas;
|
Eo *canvas;
|
||||||
|
|
||||||
Ector_Surface *ector;
|
|
||||||
|
|
||||||
Evas_Engine_Info *info;
|
Evas_Engine_Info *info;
|
||||||
void *output;
|
void *output;
|
||||||
|
|
||||||
|
@ -1611,7 +1610,7 @@ struct _Evas_Func
|
||||||
void (*texture_image_set) (void *engine, void *texture, void *image);
|
void (*texture_image_set) (void *engine, void *texture, void *image);
|
||||||
void *(*texture_image_get) (void *engine, void *texture);
|
void *(*texture_image_get) (void *engine, void *texture);
|
||||||
|
|
||||||
Ector_Surface *(*ector_create) (void *engine, void *output);
|
Ector_Surface *(*ector_create) (void *engine);
|
||||||
void (*ector_destroy) (void *engine, Ector_Surface *surface);
|
void (*ector_destroy) (void *engine, Ector_Surface *surface);
|
||||||
Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image);
|
Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image);
|
||||||
Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags);
|
Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags);
|
||||||
|
@ -1951,7 +1950,7 @@ void _efl_gfx_map_shutdown(void);
|
||||||
void _efl_gfx_map_update(Eo *eo_obj);
|
void _efl_gfx_map_update(Eo *eo_obj);
|
||||||
|
|
||||||
/* Ector */
|
/* Ector */
|
||||||
Ector_Surface *evas_ector_get(Evas_Public_Data *evas, void *output);
|
Ector_Surface *evas_ector_get(Evas_Public_Data *evas);
|
||||||
|
|
||||||
/* Temporary save/load functions */
|
/* Temporary save/load functions */
|
||||||
void evas_common_load_model_from_file(Evas_Canvas3D_Mesh *model, const char *file);
|
void evas_common_load_model_from_file(Evas_Canvas3D_Mesh *model, const char *file);
|
||||||
|
|
|
@ -2377,7 +2377,7 @@ static Eina_Bool use_cairo = EINA_FALSE;
|
||||||
static Eina_Bool use_gl = EINA_FALSE;
|
static Eina_Bool use_gl = EINA_FALSE;
|
||||||
|
|
||||||
static Ector_Surface *
|
static Ector_Surface *
|
||||||
eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED)
|
eng_ector_create(void *engine EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Ector_Surface *ector;
|
Ector_Surface *ector;
|
||||||
const char *ector_backend;
|
const char *ector_backend;
|
||||||
|
|
|
@ -4316,10 +4316,11 @@ eng_output_idle_flush(void *engine EINA_UNUSED, void *data)
|
||||||
static Eina_Bool use_cairo;
|
static Eina_Bool use_cairo;
|
||||||
|
|
||||||
static Ector_Surface *
|
static Ector_Surface *
|
||||||
eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED)
|
eng_ector_create(void *engine EINA_UNUSED)
|
||||||
{
|
{
|
||||||
Ector_Surface *ector;
|
Ector_Surface *ector;
|
||||||
const char *ector_backend;
|
const char *ector_backend;
|
||||||
|
|
||||||
ector_backend = getenv("ECTOR_BACKEND");
|
ector_backend = getenv("ECTOR_BACKEND");
|
||||||
efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
|
efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
|
||||||
if (ector_backend && !strcasecmp(ector_backend, "default"))
|
if (ector_backend && !strcasecmp(ector_backend, "default"))
|
||||||
|
|
Loading…
Reference in New Issue