egl: remove NativeWindowType/NativeDisplayType defines

This ensures we use EGLNativeWindowType and EGLNativeDisplayType
everywhere instead. The previous names come from EGL 1.2 but it seems
reasonable to require more recent EGL versions. If someone wanted to add
compatibility for EGL 1.2 later it would be straightforward to define
the new names to the old.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2014-03-05 01:33:26 +00:00 committed by Robert Bragg
parent 2beb7c40e0
commit dca992a160
8 changed files with 9 additions and 16 deletions

View File

@ -53,8 +53,6 @@ G_BEGIN_DECLS
#include <GLES/egl.h> #include <GLES/egl.h>
#else #else
#include <EGL/egl.h> #include <EGL/egl.h>
#define NativeDisplayType EGLNativeDisplayType
#define NativeWindowType EGLNativeWindowType
#endif #endif
#endif #endif

View File

@ -54,8 +54,6 @@ G_BEGIN_DECLS
#include <GLES/egl.h> #include <GLES/egl.h>
#else #else
#include <EGL/egl.h> #include <EGL/egl.h>
#define NativeDisplayType EGLNativeDisplayType
#define NativeWindowType EGLNativeWindowType
#endif #endif
#endif #endif

View File

@ -37,9 +37,6 @@
COGL_BEGIN_DECLS COGL_BEGIN_DECLS
#define NativeDisplayType EGLNativeDisplayType
#define NativeWindowType EGLNativeWindowType
#ifndef GL_OES_EGL_image #ifndef GL_OES_EGL_image
#define GLeglImageOES void * #define GLeglImageOES void *
#endif #endif

View File

@ -130,7 +130,7 @@ _cogl_winsys_egl_context_created (CoglDisplay *display,
egl_display->egl_surface = egl_display->egl_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) android_native_window, (EGLNativeWindowType) android_native_window,
NULL); NULL);
if (egl_display->egl_surface == EGL_NO_SURFACE) if (egl_display->egl_surface == EGL_NO_SURFACE)
{ {

View File

@ -137,7 +137,7 @@ _cogl_winsys_egl_context_created (CoglDisplay *display,
egl_display->egl_surface = egl_display->egl_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) display->gdl_plane, (EGLNativeWindowType) display->gdl_plane,
NULL); NULL);
if (egl_display->egl_surface == EGL_NO_SURFACE) if (egl_display->egl_surface == EGL_NO_SURFACE)

View File

@ -790,7 +790,7 @@ _cogl_winsys_egl_context_created (CoglDisplay *display,
egl_display->dummy_surface = egl_display->dummy_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) kms_display->dummy_gbm_surface, (EGLNativeWindowType) kms_display->dummy_gbm_surface,
NULL); NULL);
if (egl_display->dummy_surface == EGL_NO_SURFACE) if (egl_display->dummy_surface == EGL_NO_SURFACE)
{ {
@ -986,7 +986,7 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
egl_onscreen->egl_surface = egl_onscreen->egl_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) kms_onscreen->surface, (EGLNativeWindowType) kms_onscreen->surface,
NULL); NULL);
if (egl_onscreen->egl_surface == EGL_NO_SURFACE) if (egl_onscreen->egl_surface == EGL_NO_SURFACE)
{ {
@ -1172,7 +1172,7 @@ cogl_kms_display_set_layout (CoglDisplay *display,
new_egl_surface = new_egl_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) new_surface, (EGLNativeWindowType) new_surface,
NULL); NULL);
if (new_egl_surface == EGL_NO_SURFACE) if (new_egl_surface == EGL_NO_SURFACE)
{ {

View File

@ -96,7 +96,7 @@ _cogl_winsys_egl_context_created (CoglDisplay *display,
egl_display->egl_surface = egl_display->egl_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) NULL, (EGLNativeWindowType) NULL,
NULL); NULL);
if (egl_display->egl_surface == EGL_NO_SURFACE) if (egl_display->egl_surface == EGL_NO_SURFACE)
{ {

View File

@ -278,7 +278,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
goto error; goto error;
egl_renderer->edpy = egl_renderer->edpy =
eglGetDisplay ((NativeDisplayType) xlib_renderer->xdpy); eglGetDisplay ((EGLNativeDisplayType) xlib_renderer->xdpy);
if (!_cogl_winsys_egl_renderer_connect_common (renderer, error)) if (!_cogl_winsys_egl_renderer_connect_common (renderer, error))
goto error; goto error;
@ -481,7 +481,7 @@ _cogl_winsys_egl_onscreen_init (CoglOnscreen *onscreen,
egl_onscreen->egl_surface = egl_onscreen->egl_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_config, egl_config,
(NativeWindowType) xlib_onscreen->xwin, (EGLNativeWindowType) xlib_onscreen->xwin,
NULL); NULL);
return TRUE; return TRUE;
@ -629,7 +629,7 @@ _cogl_winsys_egl_context_created (CoglDisplay *display,
egl_display->dummy_surface = egl_display->dummy_surface =
eglCreateWindowSurface (egl_renderer->edpy, eglCreateWindowSurface (egl_renderer->edpy,
egl_display->egl_config, egl_display->egl_config,
(NativeWindowType) xlib_display->dummy_xwin, (EGLNativeWindowType) xlib_display->dummy_xwin,
NULL); NULL);
if (egl_display->dummy_surface == EGL_NO_SURFACE) if (egl_display->dummy_surface == EGL_NO_SURFACE)