[mutter] egl: Add eglBindAPI helper



commit 3c47661b78995a568f7820610669859606c3e591
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Apr 13 15:43:35 2021 +0200

    egl: Add eglBindAPI helper
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1828>

 src/backends/meta-egl.c | 14 ++++++++++++++
 src/backends/meta-egl.h |  4 ++++
 2 files changed, 18 insertions(+)
---
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index 17c3c5e49d..0d3f8c95dd 100644
--- a/src/backends/meta-egl.c
+++ b/src/backends/meta-egl.c
@@ -249,6 +249,20 @@ meta_egl_initialize (MetaEgl   *egl,
   return TRUE;
 }
 
+gboolean
+meta_egl_bind_api (MetaEgl  *egl,
+                   EGLenum   api,
+                   GError  **error)
+{
+  if (!eglBindAPI (api))
+    {
+      set_egl_error (error);
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
 gpointer
 meta_egl_get_proc_address (MetaEgl    *egl,
                            const char *procname,
diff --git a/src/backends/meta-egl.h b/src/backends/meta-egl.h
index fa7741a67c..e108e714a1 100644
--- a/src/backends/meta-egl.h
+++ b/src/backends/meta-egl.h
@@ -54,6 +54,10 @@ gboolean meta_egl_initialize (MetaEgl   *egl,
                               EGLDisplay display,
                               GError   **error);
 
+gboolean meta_egl_bind_api (MetaEgl  *egl,
+                            EGLenum   api,
+                            GError  **error);
+
 gpointer meta_egl_get_proc_address (MetaEgl    *egl,
                                     const char *procname,
                                     GError    **error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]