evas-wayland-egl: Cleanup wayland_egl engine and fix build break

A previous patch to refactor setup stage and reduce complexity
actually introduced several build breaks. This patch fixes the build
break for wayland-egl.

ref 73b308fb66

BAD CEDRIC !!!!!

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2016-12-08 09:11:28 -05:00
parent a85605553b
commit 5a0c03ded1
3 changed files with 15 additions and 10 deletions

View File

@ -608,7 +608,7 @@ eng_setup(void *info, unsigned int w, unsigned int h)
glsym_evas_gl_preload_init();
}
ob = eng_window_new(evas, inf, w, h, swap_mode);
ob = eng_window_new(inf, w, h, swap_mode);
if (!ob) goto ob_err;
if (!evas_render_engine_gl_generic_init(&re->generic, ob,
@ -633,8 +633,7 @@ eng_setup(void *info, unsigned int w, unsigned int h)
w, h))
{
eng_window_free(ob);
free(re);
return NULL;
goto ob_err;
}
gl_wins++;
@ -662,6 +661,10 @@ eng_setup(void *info, unsigned int w, unsigned int h)
eng_window_use(eng_get_ob(re));
return re;
ob_err:
free(re);
return NULL;
}
static int
@ -695,6 +698,8 @@ eng_update(void *data, void *info, unsigned int w, unsigned int h)
(ob->info->info.depth != ob->depth) ||
(ob->info->info.destination_alpha != ob->alpha))
{
Render_Engine_Swap_Mode swap_mode = MODE_AUTO;
gl_wins--;
if (!ob->info->info.wl_display)
{
@ -703,16 +708,17 @@ eng_update(void *data, void *info, unsigned int w, unsigned int h)
goto ob_err;
}
ob = eng_window_new(evas, inf, w, h, swap_mode);
swap_mode = _eng_swap_mode_get();
ob = eng_window_new(inf, w, h, swap_mode);
if (!ob) goto ob_err;
eng_window_use(ob);
evas_render_engine_software_generic_update(&re->generic.software, ob,
w, h);
evas_render_engine_software_generic_update(&re->generic.software,
ob, w, h);
gl_wins++;
}
else if ((ob->w != w) || (ob->h != h) ||
else if ((ob->w != (int)w) || (ob->h != (int)h) ||
(ob->info->info.rotation != ob->rot))
{
eng_outbuf_reconfigure(ob, w, h,

View File

@ -108,7 +108,7 @@ extern Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_unlock;
extern unsigned int (*glsym_eglSwapBuffersWithDamage) (EGLDisplay a, void *b, const EGLint *d, EGLint c);
extern unsigned int (*glsym_eglSetDamageRegionKHR) (EGLDisplay a, EGLSurface b, EGLint *c, EGLint d);
Outbuf *eng_window_new(Evas *evas, Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Engine_Swap_Mode swap_mode);
Outbuf *eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Engine_Swap_Mode swap_mode);
void eng_window_free(Outbuf *gw);
void eng_window_use(Outbuf *gw);
void eng_window_unsurf(Outbuf *gw);

View File

@ -9,7 +9,7 @@ static struct wl_display *display = NULL;
static int win_count = 0;
Outbuf *
eng_window_new(Evas *evas, Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Engine_Swap_Mode swap_mode)
eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Engine_Swap_Mode swap_mode)
{
Outbuf *gw;
int context_attrs[3];
@ -25,7 +25,6 @@ eng_window_new(Evas *evas, Evas_Engine_Info_Wayland *einfo, int w, int h, Render
win_count++;
gw->info = einfo;
gw->evas = evas;
gw->w = w;
gw->h = h;
gw->swap_mode = swap_mode;