From 8c2c3d8dbf5514893fc15dab736442356a6f693b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Tue, 18 Mar 2014 00:08:50 +0000 Subject: [PATCH] gl: fix the use of always-defined macros After 2a0f0399ae226089c2ba07b1b904741b856f37af GST_GL_* macros are always defined to 0 or 1. Don't use #ifdef ... or #if defined() on them. https://bugzilla.gnome.org/show_bug.cgi?id=726591 --- gst-libs/gst/gl/egl/gstglcontext_egl.c | 4 ++-- gst-libs/gst/gl/glprototypes/gstgl_compat.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/gl/egl/gstglcontext_egl.c b/gst-libs/gst/gl/egl/gstglcontext_egl.c index a7b8e09d78..c7283eddf3 100644 --- a/gst-libs/gst/gl/egl/gstglcontext_egl.c +++ b/gst-libs/gst/gl/egl/gstglcontext_egl.c @@ -173,7 +173,7 @@ gst_gl_context_egl_choose_config (GstGLContextEGL * egl, config_attrib[i++] = EGL_OPENGL_ES2_BIT; else config_attrib[i++] = EGL_OPENGL_BIT; -#if defined(USE_EGL_RPI) && defined(GST_GL_HAVE_WINDOW_WAYLAND) +#if defined(USE_EGL_RPI) && GST_GL_HAVE_WINDOW_WAYLAND /* The configurations r=5 g=6 b=5 seems to be buggy whereas * it works when using dispmanx directly */ config_attrib[i++] = EGL_BUFFER_SIZE; @@ -485,7 +485,7 @@ gst_gl_context_egl_get_proc_address (GstGLContext * context, const gchar * name) gpointer result = NULL; /* FIXME: On Android this returns wrong addresses for non-EGL functions */ -#ifdef GST_GL_HAVE_WINDOW_ANDROID +#if GST_GL_HAVE_WINDOW_ANDROID if (!(result = gst_gl_context_default_get_proc_address (context, name))) { if (g_str_has_prefix (name, "egl")) result = eglGetProcAddress (name); diff --git a/gst-libs/gst/gl/glprototypes/gstgl_compat.h b/gst-libs/gst/gl/glprototypes/gstgl_compat.h index 21b9f713e1..5e1f8bb38f 100644 --- a/gst-libs/gst/gl/glprototypes/gstgl_compat.h +++ b/gst-libs/gst/gl/glprototypes/gstgl_compat.h @@ -24,16 +24,16 @@ #include /* undefined typedefs */ -#ifndef GST_GL_HAVE_GLEGLIMAGEOES +#if !GST_GL_HAVE_GLEGLIMAGEOES typedef gpointer GLeglImageOES; #endif -#ifndef GST_GL_HAVE_GLCHAR +#if !GST_GL_HAVE_GLCHAR typedef gchar GLchar; #endif -#ifndef GST_GL_HAVE_GLSIZEIPTR +#if !GST_GL_HAVE_GLSIZEIPTR typedef ptrdiff_t GLsizeiptr; #endif -#ifndef GST_GL_HAVE_GLINTPTR +#if !GST_GL_HAVE_GLINTPTR typedef ptrdiff_t GLintptr; #endif