derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b997b108b5373556871ff9d1ed9bcfd2f0f49389

commit b997b108b5373556871ff9d1ed9bcfd2f0f49389
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Wed Dec 7 11:29:39 2016 -0600

    gl_drm: Don't destroy the outbuf in reconfigure
    
    Cedric tells me this is bad, and I never argue with Cedric.
    
    We now re-use the same outbuf and just reconfigure the gbm/gl stuff.
---
 src/modules/evas/engines/gl_drm/evas_outbuf.c | 29 +++++++++------------------
 1 file changed, 9 insertions(+), 20 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c 
b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index 1f8ae74..a26b418 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -541,9 +541,7 @@ void
 evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth)
 {
    Evas_Public_Data *epd;
-   Evas_Engine_Info_GL_Drm *einfo;
    Render_Engine *re;
-   Outbuf *nob;
 
    if (depth == OUTBUF_DEPTH_INHERIT) depth = ob->depth;
 
@@ -553,31 +551,22 @@ evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int 
rot, Outbuf_Depth depth)
    re = epd->engine.data.output;
    EINA_SAFETY_ON_NULL_RETURN(re);
 
-   einfo = ob->info;
-
-   if ((ob->rotation == 0) || (ob->rotation == 180))
-     nob = evas_outbuf_new(einfo, w, h, ob->swap_mode);
-   else
-     nob = evas_outbuf_new(einfo, h, w, ob->swap_mode);
-
-   if (!nob)
-     {
-        ERR("Could not create new Outbuf");
-        return;
-     }
-
    re->generic.software.ob->gl_context->references++;
 
-   evas_outbuf_free(ob);
-   re->generic.software.ob = NULL;
+   while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE));
 
-   evas_outbuf_use(nob);
+   _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);
 
-   evas_render_engine_software_generic_update(&re->generic.software, nob, w, 
h);
+   evas_render_engine_software_generic_update(&re->generic.software, ob, w, h);
 
    re->generic.software.ob->gl_context->references--;
 
-   glsym_evas_gl_common_context_resize(nob->gl_context, w, h, rot);
+   glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot);
 }
 
 Render_Engine_Swap_Mode

-- 


Reply via email to