summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_egl/evas_engine.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-12-16 09:12:30 -0600
committerDerek Foreman <derekf@osg.samsung.com>2016-12-16 09:48:15 -0600
commitc11b66434f49f6e9e5931aa9d54693fffcba9259 (patch)
tree3243c10302443a5656aaf839d6eda7c211195c9c /src/modules/evas/engines/wayland_egl/evas_engine.c
parent6f41b7a69039b75468e7ad739bd31f2745dc0bbc (diff)
evas engines: Stop using arrays of 1 member for egl context and surface
There's actually an array of 2 in gl_x11, but it appears we only use the first 1, except in an #if 0 block. I gather this is legacy for some reason - it sure doesn't seem to make any sense now, so I'm chopping off all the extra array indexes. Note: I've not changed gl_sdl - it looks like it doesn't use the context or surface at all and they could just be removed, but I don't build that one here and don't want to touch it.
Diffstat (limited to 'src/modules/evas/engines/wayland_egl/evas_engine.c')
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 4546dd7..585b404 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -270,7 +270,7 @@ evgl_eng_evas_surface_get(void *data)
270 270
271 if (!(re = (Render_Engine *)data)) return NULL; 271 if (!(re = (Render_Engine *)data)) return NULL;
272 if (!(ob = eng_get_ob(re))) return NULL; 272 if (!(ob = eng_get_ob(re))) return NULL;
273 return (void *)ob->egl_surface[0]; 273 return (void *)ob->egl_surface;
274} 274}
275 275
276static void * 276static void *
@@ -372,7 +372,7 @@ evgl_eng_context_create(void *data, void *ctxt, Evas_GL_Context_Version version)
372 { 372 {
373 context = 373 context =
374 eglCreateContext(ob->egl_disp, ob->egl_config, 374 eglCreateContext(ob->egl_disp, ob->egl_config,
375 ob->egl_context[0], attrs); 375 ob->egl_context, attrs);
376 } 376 }
377 377
378 if (!context) 378 if (!context)
@@ -676,12 +676,12 @@ eng_update(void *data, void *info, unsigned int w, unsigned int h)
676 676
677 ob = eng_get_ob(re); 677 ob = eng_get_ob(re);
678 678
679 if (!inf->info.wl_surface && (ob->egl_surface[0] != EGL_NO_SURFACE)) 679 if (!inf->info.wl_surface && (ob->egl_surface != EGL_NO_SURFACE))
680 { 680 {
681 eglDestroySurface(ob->egl_disp, ob->egl_surface[0]); 681 eglDestroySurface(ob->egl_disp, ob->egl_surface);
682 eglMakeCurrent(ob->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE, 682 eglMakeCurrent(ob->egl_disp, EGL_NO_SURFACE, EGL_NO_SURFACE,
683 EGL_NO_CONTEXT); 683 EGL_NO_CONTEXT);
684 ob->egl_surface[0] = EGL_NO_SURFACE; 684 ob->egl_surface = EGL_NO_SURFACE;
685 return 1; 685 return 1;
686 } 686 }
687 687
@@ -1385,8 +1385,8 @@ eng_preload_make_current(void *data, void *doit)
1385 1385
1386 if (doit) 1386 if (doit)
1387 { 1387 {
1388 if (!eglMakeCurrent(ob->egl_disp, ob->egl_surface[0], 1388 if (!eglMakeCurrent(ob->egl_disp, ob->egl_surface,
1389 ob->egl_surface[0], ob->egl_context[0])) 1389 ob->egl_surface, ob->egl_context))
1390 return EINA_FALSE; 1390 return EINA_FALSE;
1391 } 1391 }
1392 else 1392 else