aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-08 09:11:28 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-08 09:11:28 -0500
commit5a0c03ded16df82f9e1be412220f3a7e0edc25cf (patch)
tree2b03231a1902e9fd3105ddedf75d47a16ed79c3e
parentevas-gl-drm: Cleanup evas-gl-drm engine build and fix build break (diff)
downloadefl-5a0c03ded16df82f9e1be412220f3a7e0edc25cf.tar.gz
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 73b308fb66f871b93ef8e324997872e3bf175906 BAD CEDRIC !!!!! Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c20
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.h2
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_wl_main.c3
3 files changed, 15 insertions, 10 deletions
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index a4687d4b49..761d3f978c 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -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,
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.h b/src/modules/evas/engines/wayland_egl/evas_engine.h
index 50321a0191..f37391ac66 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.h
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.h
@@ -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);
diff --git a/src/modules/evas/engines/wayland_egl/evas_wl_main.c b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
index a164eed800..60b5f76a7d 100644
--- a/src/modules/evas/engines/wayland_egl/evas_wl_main.c
+++ b/src/modules/evas/engines/wayland_egl/evas_wl_main.c
@@ -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;