From 689321419b8ea78b939bb718d177457cc961f0b0 Mon Sep 17 00:00:00 2001 From: Maxim Solovyov Date: Sun, 18 Jun 2023 19:27:22 +0300 Subject: [PATCH] backend: egl: remove references to the glx backend --- src/backend/gl/egl.c | 12 ++++++------ src/backend/gl/egl.h | 4 +--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/backend/gl/egl.c b/src/backend/gl/egl.c index 9f65154..761eb63 100644 --- a/src/backend/gl/egl.c +++ b/src/backend/gl/egl.c @@ -67,7 +67,7 @@ const char *eglGetErrorString(EGLint error) { } /** - * Free a glx_texture_t. + * Free a gl_texture_t. */ static void egl_release_image(backend_t *base, struct gl_texture *tex) { struct egl_data *gd = (void *)base; @@ -88,14 +88,14 @@ static void egl_release_image(backend_t *base, struct gl_texture *tex) { } /** - * Destroy GLX related resources. + * Destroy EGL related resources. */ void egl_deinit(backend_t *base) { struct egl_data *gd = (void *)base; gl_deinit(&gd->gl); - // Destroy GLX context + // Destroy EGL context if (gd->ctx != EGL_NO_CONTEXT) { eglMakeCurrent(gd->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(gd->display, gd->ctx); @@ -225,12 +225,12 @@ static backend_t *egl_init(session_t *ps) { gd->ctx = eglCreateContext(gd->display, config, NULL, NULL); if (gd->ctx == EGL_NO_CONTEXT) { - log_error("Failed to get GLX context."); + log_error("Failed to get EGL context."); goto end; } if (!eglMakeCurrent(gd->display, gd->target_win, gd->target_win, gd->ctx)) { - log_error("Failed to attach GLX context."); + log_error("Failed to attach EGL context."); goto end; } @@ -423,7 +423,7 @@ struct backend_operations egl_ops = { PFNEGLGETDISPLAYDRIVERNAMEPROC eglGetDisplayDriverName; /** - * Check if a GLX extension exists. + * Check if a EGL extension exists. */ static inline bool egl_has_extension(EGLDisplay dpy, const char *ext) { const char *egl_exts = eglQueryString(dpy, EGL_EXTENSIONS); diff --git a/src/backend/gl/egl.h b/src/backend/gl/egl.h index 171b173..f482032 100644 --- a/src/backend/gl/egl.h +++ b/src/backend/gl/egl.h @@ -1,13 +1,11 @@ // SPDX-License-Identifier: MPL-2.0 // Copyright (c) Yuxuan Shui #pragma once -#include -// Older version of glx.h defines function prototypes for these extensions... -// Rename them to avoid conflicts #include #include #include #include +#include #include #include