cedric pushed a commit to branch efl-1.11. http://git.enlightenment.org/core/efl.git/commit/?id=6408a17124e3152520c0dca36d48d55dc034c379
commit 6408a17124e3152520c0dca36d48d55dc034c379 Author: Gwanglim Lee <[email protected]> Date: Thu Aug 21 11:01:17 2014 +0200 evas: Evas_wayland_Egl - fix black surface during resize Summary: use eng_output_resize of software_generic engine and move wl_egl_window_resize to eng_outbuf_reconfigure. and remove eng_output_resize of wayland_egl. @fix Test Plan: run elementary_test with wayland_egl engine under wayland Reviewers: devilhorns, raster, stefan_schmidt, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1343 Signed-off-by: Cedric BAIL <[email protected]> --- src/modules/evas/engines/wayland_egl/evas_engine.c | 57 ---------------------- .../evas/engines/wayland_egl/evas_wl_main.c | 31 ++++++++++++ 2 files changed, 31 insertions(+), 57 deletions(-) diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 59f7240..6e5b971 100644 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -775,62 +775,6 @@ eng_output_free(void *data) } static void -eng_output_resize(void *data, int w, int h) -{ - Render_Engine *re; - Outbuf *ob; - - if (!(re = (Render_Engine *)data)) return; - if (!(ob = eng_get_ob(re))) return; - - eng_window_use(ob); - - if (ob->win) - { - int aw, ah, dx = 0, dy = 0; - - if ((ob->rot == 90) || (ob->rot == 270)) - wl_egl_window_get_attached_size(ob->win, &ah, &aw); - else - wl_egl_window_get_attached_size(ob->win, &aw, &ah); - - if (ob->info->info.edges & 4) // resize from left - { - if ((ob->rot == 90) || (ob->rot == 270)) - dx = ah - h; - else - dx = aw - w; - } - - if (ob->info->info.edges & 1) // resize from top - { - if ((ob->rot == 90) || (ob->rot == 270)) - dy = aw - w; - else - dy = ah - h; - } - - if ((ob->rot == 90) || (ob->rot == 270)) - wl_egl_window_resize(ob->win, h, w, dx, dy); - else - wl_egl_window_resize(ob->win, w, h, dx, dy); - } - - glsym_evas_gl_common_context_resize(ob->gl_context, w, h, ob->rot); - - if (re->generic.software.tb) - evas_common_tilebuf_free(re->generic.software.tb); - - re->generic.software.tb = evas_common_tilebuf_new(w, h); - if (re->generic.software.tb) - { - evas_common_tilebuf_set_tile_size(re->generic.software.tb, - TILESIZE, TILESIZE); - evas_common_tilebuf_tile_strict_set(re->generic.software.tb, EINA_TRUE); - } -} - -static void eng_output_dump(void *data) { Render_Engine *re; @@ -1072,7 +1016,6 @@ module_open(Evas_Module *em) ORD(canvas_alpha_get); ORD(output_free); - ORD(output_resize); ORD(output_dump); ORD(image_native_set); diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c index 89eb643..a7dfff8 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -320,6 +320,37 @@ eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth EIN ob->rot = rot; eng_window_use(ob); glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot); + + if (ob->win) + { + int aw, ah, dx = 0, dy = 0; + + if ((ob->rot == 90) || (ob->rot == 270)) + wl_egl_window_get_attached_size(ob->win, &ah, &aw); + else + wl_egl_window_get_attached_size(ob->win, &aw, &ah); + + if (ob->info->info.edges & 4) // resize from left + { + if ((ob->rot == 90) || (ob->rot == 270)) + dx = ah - h; + else + dx = aw - w; + } + + if (ob->info->info.edges & 1) // resize from top + { + if ((ob->rot == 90) || (ob->rot == 270)) + dy = aw - w; + else + dy = ah - h; + } + + if ((ob->rot == 90) || (ob->rot == 270)) + wl_egl_window_resize(ob->win, h, w, dx, dy); + else + wl_egl_window_resize(ob->win, w, h, dx, dy); + } } int --
