[waffle] [PATCH 02/12] core: store context API in wcore_context

Frank Henigman fjhenigman at google.com
Wed Jan 6 11:56:31 PST 2016


Facilitates api-specific code in core functions, like the forthcoming
wflinfo-like function.

Signed-off-by: Frank Henigman <fjhenigman at google.com>
---
 src/waffle/core/wcore_context.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/waffle/core/wcore_context.h b/src/waffle/core/wcore_context.h
index 3800113..451bbf7 100644
--- a/src/waffle/core/wcore_context.h
+++ b/src/waffle/core/wcore_context.h
@@ -40,6 +40,7 @@ union waffle_native_context;
 
 struct wcore_context {
     struct api_object api;
+    int32_t context_api; // WAFFLE_CONTEXT_API enum, e.g. WAFFLE_CONTEXT_OPENGL
     struct wcore_display *display;
 };
 
@@ -61,6 +62,7 @@ wcore_context_init(struct wcore_context *self,
     assert(config);
 
     self->api.display_id = config->display->api.display_id;
+    self->context_api = config->attrs.context_api;
     self->display = config->display;
 
     return true;
-- 
2.6.0.rc2.230.g3dd15c0



More information about the waffle mailing list