evas: Try to fix compilation with EGLAttrib
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 20 Dec 2016 08:07:50 +0000 (17:07 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 21 Dec 2016 04:56:14 +0000 (13:56 +0900)
src/modules/evas/engines/gl_common/evas_gl_context.c
src/modules/evas/engines/gl_common/evas_gl_define.h
src/modules/evas/engines/gl_drm/evas_engine.c
src/modules/evas/engines/gl_drm/evas_outbuf.c
src/modules/evas/engines/gl_x11/evas_engine.c
src/modules/evas/engines/gl_x11/evas_x_main.c

index 8cca90a..dc04597 100644 (file)
@@ -55,7 +55,6 @@ void          *(*secsym_eglMapImageSEC)               (void *a, void *b, int c,
 unsigned int   (*secsym_eglUnmapImageSEC)             (void *a, void *b, int c) = NULL;
 unsigned int   (*secsym_eglGetImageAttribSEC)         (void *a, void *b, int c, int *d) = NULL;
 
-
 /* This one is now a local wrapper to avoid type mixups */
 void *        evas_gl_common_eglCreateImage           (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
 static void * (*eglsym_eglCreateImage)                (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list) = NULL;
index 0e76f41..8750250 100644 (file)
@@ -282,6 +282,9 @@ Much of it is from Mesa, so their copyright is included as well.
 #ifndef EGL_WAYLAND_Y_INVERTED_WL
 # define EGL_WAYLAND_Y_INVERTED_WL 0x31DB
 #endif
+#ifndef EGL_PLATFORM_X11_KHR
+# define EGL_PLATFORM_X11_KHR 0x31D5
+#endif
 // Evas_3d require GL_BGR, but that's an extention and will not be necessary once we move to Evas_GL_Image
 #ifndef GL_BGR
 #define GL_BGR 0x80E0
@@ -329,4 +332,8 @@ Much of it is from Mesa, so their copyright is included as well.
 #define GL_STENCIL_EXT 0x1802
 #endif
 
+#if defined(GL_GLES) && !defined(EGL_VERSION_1_5)
+typedef intptr_t EGLAttrib;
+#endif
+
 #endif
index 5fab775..61f3f07 100644 (file)
 
 #define EVAS_GL_UPDATE_TILE_SIZE 16
 
-#ifndef EGL_VERSION_1_5
-typedef intptr_t EGLAttrib;
-#endif
-
 /* external variables */
 int _evas_engine_gl_drm_log_dom = -1;
 int _extn_have_buffer_age = 1;
index b76f3eb..cfc40a0 100644 (file)
@@ -1,5 +1,4 @@
 #include "evas_engine.h"
-#include "../gl_common/evas_gl_define.h"
 
 /* local variables */
 static Outbuf *_evas_gl_drm_window = NULL;
index 9d6150a..94bfded 100644 (file)
@@ -79,10 +79,6 @@ glsym_func_void_ptr glsym_evas_gl_common_current_context_get = NULL;
 
 #ifdef GL_GLES
 
-#if !defined(EGL_KHR_cl_event2) && !defined(EGL_VERSION_1_5)
-typedef intptr_t EGLAttribKHR;
-#endif
-
 _eng_fn  (*glsym_eglGetProcAddress)            (const char *a) = NULL;
 EGLImageKHR (*glsym_evas_gl_common_eglCreateImage)(EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
 void     (*glsym_eglDestroyImage)              (EGLDisplay a, void *b) = NULL;
@@ -2938,7 +2934,7 @@ eng_image_native_set(void *data, void *image, void *native)
           {
              if ((n = calloc(1, sizeof(Native))))
                {
-                  EGLAttribKHR attribs[3];
+                  EGLAttrib attribs[3];
                   int format, yinvert = 1;
 
                   glsym_eglQueryWaylandBufferWL(eng_get_ob(re)->egl_disp, wl_buf,
index 18fad57..4cd47f5 100644 (file)
@@ -151,14 +151,6 @@ _visuals_hash_index_get_from_info(Evas_Engine_Info_GL_X11 *info)
 
 #ifdef GL_GLES
 
-#ifndef EGL_PLATFORM_X11_KHR
-# define EGL_PLATFORM_X11_KHR 0x31D5
-#endif
-
-#ifndef EGL_VERSION_1_5
-typedef intptr_t EGLAttrib;
-#endif
-
 static EGLDisplay *
 _x11_eglGetDisplay(Display *x11_display)
 {