From 39a09ca5659a872187732922a0295c1a49782a4d Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 20 Feb 2021 01:45:38 -0500 Subject: [PATCH] [client] egl: remove dependency on SDL After this PR, EGL functions are now accessed through instead of through , removing a pointless dependency on SDL. --- client/renderers/EGL/desktop.h | 1 - client/renderers/EGL/egl.c | 4 ---- client/renderers/EGL/egldebug.c | 30 +++++++++++++++--------------- client/renderers/EGL/model.c | 2 -- client/renderers/EGL/shader.c | 2 -- client/renderers/EGL/texture.c | 2 -- client/renderers/EGL/texture.h | 3 ++- 7 files changed, 17 insertions(+), 27 deletions(-) diff --git a/client/renderers/EGL/desktop.h b/client/renderers/EGL/desktop.h index b3fac51a..b603a6cd 100644 --- a/client/renderers/EGL/desktop.h +++ b/client/renderers/EGL/desktop.h @@ -20,7 +20,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA #pragma once #include -#include #include "interface/renderer.h" diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 12c6ba4e..e1d1e7b9 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -29,10 +29,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include -#if defined(SDL_VIDEO_DRIVER_WAYLAND) -#include -#endif - #include #include diff --git a/client/renderers/EGL/egldebug.c b/client/renderers/EGL/egldebug.c index 061f5933..57cba808 100644 --- a/client/renderers/EGL/egldebug.c +++ b/client/renderers/EGL/egldebug.c @@ -18,8 +18,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA */ #include "egldebug.h" -#include #include +#include const char * egl_getErrorStr(void) { @@ -28,18 +28,18 @@ const char * egl_getErrorStr(void) case EGL_SUCCESS : return "EGL_SUCCESS"; case EGL_NOT_INITIALIZED : return "EGL_NOT_INITIALIZED"; case EGL_BAD_ACCESS : return "EGL_BAD_ACCESS"; - case EGL_BAD_ALLOC : return "EGL_BAD_ALLOC"; - case EGL_BAD_ATTRIBUTE : return "EGL_BAD_ATTRIBUTE"; - case EGL_BAD_CONTEXT : return "EGL_BAD_CONTEXT"; - case EGL_BAD_CONFIG : return "EGL_BAD_CONFIG"; - case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE"; - case EGL_BAD_DISPLAY : return "EGL_BAD_DISPLAY"; - case EGL_BAD_SURFACE : return "EGL_BAD_SURFACE"; - case EGL_BAD_MATCH : return "EGL_BAD_MATCH"; - case EGL_BAD_PARAMETER : return "EGL_BAD_PARAMETER"; - case EGL_BAD_NATIVE_PIXMAP : return "EGL_BAD_NATIVE_PIXMAP"; - case EGL_BAD_NATIVE_WINDOW : return "EGL_BAD_NATIVE_WINDOW"; - case EGL_CONTEXT_LOST : return "EGL_CONTEXT_LOST"; - default : return "UNKNOWN"; - } + case EGL_BAD_ALLOC : return "EGL_BAD_ALLOC"; + case EGL_BAD_ATTRIBUTE : return "EGL_BAD_ATTRIBUTE"; + case EGL_BAD_CONTEXT : return "EGL_BAD_CONTEXT"; + case EGL_BAD_CONFIG : return "EGL_BAD_CONFIG"; + case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE"; + case EGL_BAD_DISPLAY : return "EGL_BAD_DISPLAY"; + case EGL_BAD_SURFACE : return "EGL_BAD_SURFACE"; + case EGL_BAD_MATCH : return "EGL_BAD_MATCH"; + case EGL_BAD_PARAMETER : return "EGL_BAD_PARAMETER"; + case EGL_BAD_NATIVE_PIXMAP : return "EGL_BAD_NATIVE_PIXMAP"; + case EGL_BAD_NATIVE_WINDOW : return "EGL_BAD_NATIVE_WINDOW"; + case EGL_CONTEXT_LOST : return "EGL_CONTEXT_LOST"; + default : return "UNKNOWN"; + } } diff --git a/client/renderers/EGL/model.c b/client/renderers/EGL/model.c index 8994353d..c167bafa 100644 --- a/client/renderers/EGL/model.c +++ b/client/renderers/EGL/model.c @@ -29,8 +29,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#include - struct EGL_Model { bool rebuild; diff --git a/client/renderers/EGL/shader.c b/client/renderers/EGL/shader.c index 2ae033ff..06c976d6 100644 --- a/client/renderers/EGL/shader.c +++ b/client/renderers/EGL/shader.c @@ -25,8 +25,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#include - struct EGL_Shader { bool hasShader; diff --git a/client/renderers/EGL/texture.c b/client/renderers/EGL/texture.c index 208d0d7e..d3ece535 100644 --- a/client/renderers/EGL/texture.c +++ b/client/renderers/EGL/texture.c @@ -39,8 +39,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA #define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') -#include - /* this must be a multiple of 2 */ #define BUFFER_COUNT 4 diff --git a/client/renderers/EGL/texture.h b/client/renderers/EGL/texture.h index dd5e45bd..12e3377a 100644 --- a/client/renderers/EGL/texture.h +++ b/client/renderers/EGL/texture.h @@ -23,8 +23,9 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include "shader.h" #include "common/framebuffer.h" -#include #include +#include +#include typedef struct EGL_Texture EGL_Texture;