[mutter] egl: Add eglInitialize helper
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] egl: Add eglInitialize helper
- Date: Thu, 17 Nov 2016 16:08:11 +0000 (UTC)
commit 78c121eb10e63cdeff1399cbd909db9156ccca1c
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Sep 29 22:26:24 2016 +0800
egl: Add eglInitialize helper
https://bugzilla.gnome.org/show_bug.cgi?id=773629
src/backends/meta-egl.c | 14 ++++++++++++++
src/backends/meta-egl.h | 4 ++++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index 579c2b2..499b04f 100644
--- a/src/backends/meta-egl.c
+++ b/src/backends/meta-egl.c
@@ -185,6 +185,20 @@ meta_egl_has_extensions (MetaEgl *egl,
}
gboolean
+meta_egl_initialize (MetaEgl *egl,
+ EGLDisplay display,
+ GError **error)
+{
+ if (!eglInitialize (display, NULL, NULL))
+ {
+ set_egl_error (error);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+gboolean
meta_egl_choose_config (MetaEgl *egl,
EGLDisplay display,
const EGLint *attrib_list,
diff --git a/src/backends/meta-egl.h b/src/backends/meta-egl.h
index d354569..40db950 100644
--- a/src/backends/meta-egl.h
+++ b/src/backends/meta-egl.h
@@ -38,6 +38,10 @@ gboolean meta_egl_has_extensions (MetaEgl *egl,
char *first_extension,
...);
+gboolean meta_egl_initialize (MetaEgl *egl,
+ EGLDisplay display,
+ GError **error);
+
gboolean meta_egl_choose_config (MetaEgl *egl,
EGLDisplay display,
const EGLint *attrib_list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]