evas-wayland-egl: Override image_native init and shutdown functions

If we are going to define native_init & native_shutdown functions,
then we should probably be using them ;) Also, as this is a wayland
egl engine, we can return from native_init based on
eglQueryWaylandBufferWL

ref 20b4d9dd6a

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-03-18 08:50:54 -04:00
parent e64c30caab
commit 67db4d7c1a
1 changed files with 8 additions and 1 deletions

View File

@ -1003,8 +1003,11 @@ eng_image_native_init(void *data EINA_UNUSED, Evas_Native_Surface_Type type)
#endif
case EVAS_NATIVE_SURFACE_EVASGL:
case EVAS_NATIVE_SURFACE_OPENGL:
case EVAS_NATIVE_SURFACE_WL:
return 1;
#if defined(GL_GLES) && defined(HAVE_WAYLAND)
case EVAS_NATIVE_SURFACE_WL:
return (glsym_eglQueryWaylandBufferWL != NULL) ? 1 : 0;
#endif
default:
ERR("Native surface type %d not supported!", type);
return 0;
@ -1023,7 +1026,9 @@ eng_image_native_shutdown(void *data EINA_UNUSED, Evas_Native_Surface_Type type)
#endif
case EVAS_NATIVE_SURFACE_EVASGL:
case EVAS_NATIVE_SURFACE_OPENGL:
#if defined(GL_GLES) && defined(HAVE_WAYLAND)
case EVAS_NATIVE_SURFACE_WL:
#endif
return;
default:
ERR("Native surface type %d not supported!", type);
@ -1423,6 +1428,8 @@ module_open(Evas_Module *em)
ORD(output_dump);
ORD(image_native_set);
ORD(image_native_init);
ORD(image_native_shutdown);
gl_symbols();