summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-12-07 11:29:39 -0600
committerDerek Foreman <derekf@osg.samsung.com>2016-12-07 11:30:03 -0600
commitb997b108b5373556871ff9d1ed9bcfd2f0f49389 (patch)
tree41c0bb297cf2cee0f8cb1110d59f3c5dd7430a7c /src/modules
parent515362efe21e87ba9d8de087634085408b365d26 (diff)
downloadefl-b997b108b5373556871ff9d1ed9bcfd2f0f49389.tar.gz
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.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/gl_drm/evas_outbuf.c29
1 files 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 1f8ae744eb..a26b418fd7 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