From: huiyu.eun Date: Thu, 8 Jun 2017 01:54:40 +0000 (+0900) Subject: [EvasGL] Fix the bug when use prerotate X-Git-Tag: accepted/tizen/unified/20170630.083054~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F132823%2F3;p=platform%2Fupstream%2Fefl.git [EvasGL] Fix the bug when use prerotate - Modify Environment Variable : EVAS_GL_PREROTATION_DISABLE - When use prerotate, ob->rot is always zero Change-Id: Ie059b65b42db681010308a99abf1f33ea0612f88 Signed-off-by: huiyu.eun --- 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 99ba172..4d652d2 100644 --- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c +++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c @@ -156,7 +156,7 @@ _orig_eng_window_new(Evas *evas, Evas_Engine_Info_Wayland_Egl *einfo, int w, int } //TIZEN_ONLY(20161121):Support PreRotation - if (getenv("EVAS_GL_PREROTATION") && glsym_wl_egl_win_get_capabilities) + if (!getenv("EVAS_GL_PREROTATION_DISABLE") && glsym_wl_egl_win_get_capabilities) { int prerotation_cap = EVAS_WL_EGL_WINDOW_CAPABILITY_NONE; prerotation_cap = glsym_wl_egl_win_get_capabilities(gw->win); @@ -461,21 +461,23 @@ eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth EIN ob->w = w; ob->h = h; ob->rot = rot; + if (ob->support_pre_rotation && ob->gl_context->pre_rotated) + ob->rot = 0; eng_window_use(ob); - glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot,1); + glsym_evas_gl_common_context_resize(ob->gl_context, w, h, ob->rot,1); if (ob->win) { int aw, ah, dx = 0, dy = 0; - if ((ob->rot == 90) || (ob->rot == 270)) + if ((ob->info->info.rotation == 90) || (ob->info->info.rotation == 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)) + if ((ob->info->info.rotation == 90) || (ob->info->info.rotation == 270)) dx = ah - h; else dx = aw - w; @@ -483,16 +485,18 @@ eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth EIN if (ob->info->info.edges & 1) // resize from top { - if ((ob->rot == 90) || (ob->rot == 270)) + if ((ob->info->info.rotation == 90) || (ob->info->info.rotation == 270)) dy = aw - w; else dy = ah - h; } - if ((ob->rot == 90) || (ob->rot == 270)) + if ((ob->info->info.rotation == 90) || (ob->info->info.rotation == 270)) wl_egl_window_resize(ob->win, h, w, dx, dy); else wl_egl_window_resize(ob->win, w, h, dx, dy); + + } }