summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:52:10 -0700
committerCedric BAIL <cedric@osg.samsung.com>2017-08-25 10:52:10 -0700
commita0c58276c34a1877b2c8a15502b06431ecb4b306 (patch)
tree21f40754413f2931ea730494efdf734e0c6325ac
parent68b846c1f46146a1ef921168c2cb926945ff387c (diff)
evas: do not use default output or any other during render pre.
-rw-r--r--src/lib/evas/canvas/evas_main.c18
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c4
-rw-r--r--src/lib/evas/canvas/evas_out.c2
-rw-r--r--src/lib/evas/include/evas_private.h7
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c2
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c3
6 files changed, 14 insertions, 22 deletions
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 84b535ca35..0ebe72d9ed 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -378,6 +378,8 @@ next_zombie:
378 evas_event_callback_all_del(eo_e); 378 evas_event_callback_all_del(eo_e);
379 evas_event_callback_cleanup(eo_e); 379 evas_event_callback_cleanup(eo_e);
380 380
381 /* Ector surface may require an existing output to finish its job */
382 e->engine.func->ector_destroy(_evas_engine_context(e), e->ector);
381 /* cleanup engine backend */ 383 /* cleanup engine backend */
382 EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo); 384 EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
383 e->engine.func->engine_free(e->backend); 385 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
842} 844}
843 845
844Ector_Surface * 846Ector_Surface *
845evas_ector_get(Evas_Public_Data *e, void *output) 847evas_ector_get(Evas_Public_Data *e)
846{ 848{
847 Efl_Canvas_Output *r; 849 if (!e->ector)
848 Eina_List *l; 850 e->ector = e->engine.func->ector_create(_evas_engine_context(e));
849 851 return e->ector;
850 EINA_LIST_FOREACH(e->outputs, l, r)
851 if (r->output == output)
852 {
853 if (!r->ector)
854 r->ector = e->engine.func->ector_create(_evas_engine_context(e), output);
855 return r->ector;
856 }
857 return NULL;
858} 852}
859 853
860EAPI Evas_BiDi_Direction 854EAPI Evas_BiDi_Direction
diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c
index 1b1e2bbbc5..c1a2730407 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -178,7 +178,7 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
178 int x, int y, Eina_Bool do_async) 178 int x, int y, Eina_Bool do_async)
179{ 179{
180 Evas_VG_Data *vd = type_private_data; 180 Evas_VG_Data *vd = type_private_data;
181 Ector_Surface *ector = evas_ector_get(obj->layer->evas, output); 181 Ector_Surface *ector = evas_ector_get(obj->layer->evas);
182 // FIXME: Set context (that should affect Ector_Surface) and 182 // FIXME: Set context (that should affect Ector_Surface) and
183 // then call Ector_Renderer render from bottom to top. Get the 183 // then call Ector_Renderer render from bottom to top. Get the
184 // Ector_Surface that match the output from Evas engine API. 184 // Ector_Surface that match the output from Evas engine API.
@@ -248,7 +248,7 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
248 } 248 }
249 249
250 // FIXME: handle damage only on changed renderer. 250 // FIXME: handle damage only on changed renderer.
251 s = evas_ector_get(obj->layer->evas, _evas_default_output_get(obj->layer->evas)); 251 s = evas_ector_get(obj->layer->evas);
252 if (vd->root && s) 252 if (vd->root && s)
253 _evas_vg_render_pre(vd->root, s, NULL); 253 _evas_vg_render_pre(vd->root, s, NULL);
254 254
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 666becdf1e..42f8ed4401 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -74,8 +74,6 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
74 74
75 if (e->engine.func) 75 if (e->engine.func)
76 { 76 {
77 e->engine.func->ector_destroy(_evas_engine_context(e),
78 output->ector);
79 e->engine.func->output_free(_evas_engine_context(e), 77 e->engine.func->output_free(_evas_engine_context(e),
80 output->output); 78 output->output);
81 free(output->info); 79 free(output->info);
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index c01eb0dc3c..529256a3c5 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -964,6 +964,7 @@ struct _Evas_Public_Data
964 Eina_Array *cur_device; 964 Eina_Array *cur_device;
965 965
966 void *backend; 966 void *backend;
967 Ector_Surface *ector;
967 Eina_List *outputs; 968 Eina_List *outputs;
968 969
969 Evas_Device *default_seat; 970 Evas_Device *default_seat;
@@ -1333,8 +1334,6 @@ struct _Efl_Canvas_Output
1333{ 1334{
1334 Eo *canvas; 1335 Eo *canvas;
1335 1336
1336 Ector_Surface *ector;
1337
1338 Evas_Engine_Info *info; 1337 Evas_Engine_Info *info;
1339 void *output; 1338 void *output;
1340 1339
@@ -1611,7 +1610,7 @@ struct _Evas_Func
1611 void (*texture_image_set) (void *engine, void *texture, void *image); 1610 void (*texture_image_set) (void *engine, void *texture, void *image);
1612 void *(*texture_image_get) (void *engine, void *texture); 1611 void *(*texture_image_get) (void *engine, void *texture);
1613 1612
1614 Ector_Surface *(*ector_create) (void *engine, void *output); 1613 Ector_Surface *(*ector_create) (void *engine);
1615 void (*ector_destroy) (void *engine, Ector_Surface *surface); 1614 void (*ector_destroy) (void *engine, Ector_Surface *surface);
1616 Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image); 1615 Ector_Buffer *(*ector_buffer_wrap) (void *engine, Evas *e, void *engine_image);
1617 Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags); 1616 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);
1951void _efl_gfx_map_update(Eo *eo_obj); 1950void _efl_gfx_map_update(Eo *eo_obj);
1952 1951
1953/* Ector */ 1952/* Ector */
1954Ector_Surface *evas_ector_get(Evas_Public_Data *evas, void *output); 1953Ector_Surface *evas_ector_get(Evas_Public_Data *evas);
1955 1954
1956/* Temporary save/load functions */ 1955/* Temporary save/load functions */
1957void evas_common_load_model_from_file(Evas_Canvas3D_Mesh *model, const char *file); 1956void evas_common_load_model_from_file(Evas_Canvas3D_Mesh *model, const char *file);
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index 96f9afed1a..a3e19909f4 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2377,7 +2377,7 @@ static Eina_Bool use_cairo = EINA_FALSE;
2377static Eina_Bool use_gl = EINA_FALSE; 2377static Eina_Bool use_gl = EINA_FALSE;
2378 2378
2379static Ector_Surface * 2379static Ector_Surface *
2380eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED) 2380eng_ector_create(void *engine EINA_UNUSED)
2381{ 2381{
2382 Ector_Surface *ector; 2382 Ector_Surface *ector;
2383 const char *ector_backend; 2383 const char *ector_backend;
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index f54c0843d6..b7dd3c8058 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4316,10 +4316,11 @@ eng_output_idle_flush(void *engine EINA_UNUSED, void *data)
4316static Eina_Bool use_cairo; 4316static Eina_Bool use_cairo;
4317 4317
4318static Ector_Surface * 4318static Ector_Surface *
4319eng_ector_create(void *engine EINA_UNUSED, void *output EINA_UNUSED) 4319eng_ector_create(void *engine EINA_UNUSED)
4320{ 4320{
4321 Ector_Surface *ector; 4321 Ector_Surface *ector;
4322 const char *ector_backend; 4322 const char *ector_backend;
4323
4323 ector_backend = getenv("ECTOR_BACKEND"); 4324 ector_backend = getenv("ECTOR_BACKEND");
4324 efl_domain_current_push(EFL_ID_DOMAIN_SHARED); 4325 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
4325 if (ector_backend && !strcasecmp(ector_backend, "default")) 4326 if (ector_backend && !strcasecmp(ector_backend, "default"))