From f5fed8764df832fed9b7bb2c2a872223a983a00b Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Tue, 5 Mar 2019 13:32:14 -0500 Subject: [PATCH] evas-gl-drm: Fix issue of rotation not actually rotating When we call evas_outbuf_reconfigure (when rotation changes), we need to update the Outbuf with new values for width, height, rotation, etc. Failing to do this here causes any rotations applied to the engine to fail. ref T7690 @fix Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8109 --- src/modules/evas/engines/gl_drm/evas_outbuf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c b/src/modules/evas/engines/gl_drm/evas_outbuf.c index 4f8aa10669..e8fb312d65 100644 --- a/src/modules/evas/engines/gl_drm/evas_outbuf.c +++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c @@ -550,14 +550,18 @@ evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth) while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE)); + ob->w = w; + ob->h = h; + ob->rotation = rot; + _evas_outbuf_gbm_surface_destroy(ob); + if ((ob->rotation == 0) || (ob->rotation == 180)) _evas_outbuf_gbm_surface_create(ob, w, h); else if ((ob->rotation == 90) || (ob->rotation == 270)) _evas_outbuf_gbm_surface_create(ob, h, w); - _evas_outbuf_egl_setup(ob); - glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot); + _evas_outbuf_egl_setup(ob); } Render_Output_Swap_Mode @@ -622,7 +626,7 @@ evas_outbuf_update_region_first_rect(Outbuf *ob) if (!_re_wincheck(ob)) return EINA_TRUE; - /* glsym_evas_gl_common_context_resize(ob->gl_context, ob->w, ob->h, ob->rotation); */ + glsym_evas_gl_common_context_resize(ob->gl_context, ob->w, ob->h, ob->rotation); glsym_evas_gl_common_context_flush(ob->gl_context); glsym_evas_gl_common_context_newframe(ob->gl_context);