summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2012-10-01 10:14:33 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-10-04 18:35:39 -0700
commit6702e66bec129278175bf61d875ec5d9211d981b (patch)
treecd1de03514a74ea868b95833bc54b25beed42654 /include
parent6b739f8edb29164285d0f93b67fb4a0061243ead (diff)
gbm: initial skeleton for gbm support
All routines in this skeleton will fail. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/CMakeLists.txt1
-rw-r--r--include/waffle/waffle_config.h2
-rw-r--r--include/waffle/waffle_context.h2
-rw-r--r--include/waffle/waffle_display.h2
-rw-r--r--include/waffle/waffle_gbm.h65
-rw-r--r--include/waffle/waffle_window.h2
6 files changed, 74 insertions, 0 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 4a402e6..33bc91a 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -14,6 +14,7 @@ install(FILES waffle/waffle.h
waffle/waffle_enum.h
waffle/waffle_error.h
waffle/waffle_gl_misc.h
+ waffle/waffle_gbm.h
waffle/waffle_glx.h
waffle/waffle_init.h
waffle/waffle_portability.h
diff --git a/include/waffle/waffle_config.h b/include/waffle/waffle_config.h
index c3b7b5e..58414c0 100644
--- a/include/waffle/waffle_config.h
+++ b/include/waffle/waffle_config.h
@@ -43,11 +43,13 @@ extern "C" {
struct waffle_config;
struct waffle_display;
+struct waffle_gbm_config;
struct waffle_glx_config;
struct waffle_x11_egl_config;
struct waffle_wayland_config;
union waffle_native_config {
+ struct waffle_gbm_config *gbm;
struct waffle_glx_config *glx;
struct waffle_x11_egl_config *x11_egl;
struct waffle_wayland_config *wayland;
diff --git a/include/waffle/waffle_context.h b/include/waffle/waffle_context.h
index d0264b1..a360560 100644
--- a/include/waffle/waffle_context.h
+++ b/include/waffle/waffle_context.h
@@ -42,11 +42,13 @@ extern "C" {
struct waffle_config;
struct waffle_context;
+struct waffle_gbm_context;
struct waffle_glx_context;
struct waffle_x11_egl_context;
struct waffle_wayland_context;
union waffle_native_context {
+ struct waffle_gbm_context *gbm;
struct waffle_glx_context *glx;
struct waffle_x11_egl_context *x11_egl;
struct waffle_wayland_context *wayland;
diff --git a/include/waffle/waffle_display.h b/include/waffle/waffle_display.h
index 6146de2..d65d269 100644
--- a/include/waffle/waffle_display.h
+++ b/include/waffle/waffle_display.h
@@ -42,11 +42,13 @@ extern "C" {
struct waffle_display;
+struct waffle_gbm_display;
struct waffle_glx_display;
struct waffle_x11_egl_display;
struct waffle_wayland_display;
union waffle_native_display {
+ struct waffle_gbm_display *gbm;
struct waffle_glx_display *glx;
struct waffle_x11_egl_display *x11_egl;
struct waffle_wayland_display *wayland;
diff --git a/include/waffle/waffle_gbm.h b/include/waffle/waffle_gbm.h
new file mode 100644
index 0000000..fe45343
--- /dev/null
+++ b/include/waffle/waffle_gbm.h
@@ -0,0 +1,65 @@
+// Copyright 2012 Intel Corporation
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+// - Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// - Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#pragma once
+
+#define __GBM__ 1
+
+#include <stdbool.h>
+#include <stdint.h>
+
+#include <EGL/egl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct gbm_device;
+struct gbm_surface;
+
+struct waffle_gbm_display {
+ struct gbm_device *gbm_device;
+ EGLDisplay egl_display;
+};
+
+struct waffle_gbm_config {
+ struct waffle_gbm_display display;
+ EGLConfig egl_config;
+};
+
+struct waffle_gbm_context {
+ struct waffle_gbm_display display;
+ EGLContext egl_context;
+};
+
+struct waffle_gbm_window {
+ struct waffle_gbm_display display;
+ struct gbm_surface *gbm_surface;
+ EGLSurface egl_surface;
+};
+
+#ifdef __cplusplus
+} // end extern "C"
+#endif
diff --git a/include/waffle/waffle_window.h b/include/waffle/waffle_window.h
index ac82304..02da0f4 100644
--- a/include/waffle/waffle_window.h
+++ b/include/waffle/waffle_window.h
@@ -41,11 +41,13 @@ extern "C" {
struct waffle_config;
struct waffle_window;
+struct waffle_gbm_window;
struct waffle_glx_window;
struct waffle_x11_egl_window;
struct waffle_wayland_window;
union waffle_native_window {
+ struct waffle_gbm_window *gbm;
struct waffle_glx_window *glx;
struct waffle_x11_egl_window *x11_egl;
struct waffle_wayland_window *wayland;