gl_drm: simplify outbuf_reconfigure

Calling render_engine_software_generic_update from eng_setup lets us
remove a bunch of stuff from evas_outbuf_reconfigure.
This commit is contained in:
Derek Foreman 2016-12-07 15:53:08 -06:00
parent 8205051ff6
commit 661e44c38d
2 changed files with 4 additions and 15 deletions

View File

@ -1018,6 +1018,10 @@ eng_setup(Evas *evas, void *in)
epd->output.w, epd->output.h,
info->info.rotation,
info->info.depth);
evas_render_engine_software_generic_update(&re->generic.software,
re->generic.software.ob,
epd->output.w,
epd->output.h);
}
}
}

View File

@ -540,19 +540,8 @@ evas_outbuf_unsurf(Outbuf *ob)
void
evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth)
{
Evas_Public_Data *epd;
Render_Engine *re;
if (depth == OUTBUF_DEPTH_INHERIT) depth = ob->depth;
epd = efl_data_scope_get(ob->evas, EVAS_CANVAS_CLASS);
EINA_SAFETY_ON_NULL_RETURN(epd);
re = epd->engine.data.output;
EINA_SAFETY_ON_NULL_RETURN(re);
re->generic.software.ob->gl_context->references++;
while (ecore_drm2_fb_release(ob->priv.output, EINA_TRUE));
_evas_outbuf_gbm_surface_destroy(ob);
@ -562,10 +551,6 @@ evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth)
_evas_outbuf_gbm_surface_create(ob, h, w);
_evas_outbuf_egl_setup(ob);
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(ob->gl_context, w, h, rot);
}