Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Unified Diff: mojo/public/platform/nacl/mojo_irt.h

Issue 1413683003: Expose MGL interface through NaCl IRT (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/platform/nacl/mojo_irt.h
diff --git a/mojo/public/platform/nacl/mojo_irt.h b/mojo/public/platform/nacl/mojo_irt.h
index db3a180ffd333748115a2fc18647b4360d56271b..df497ba6629c6d1a5caf1a8eb808af5dab1e97f7 100644
--- a/mojo/public/platform/nacl/mojo_irt.h
+++ b/mojo/public/platform/nacl/mojo_irt.h
@@ -8,6 +8,8 @@
#ifndef MOJO_PUBLIC_PLATFORM_NACL_MOJO_IRT_H_
#define MOJO_PUBLIC_PLATFORM_NACL_MOJO_IRT_H_
+#include "mojo/public/c/gpu/MGL/mgl.h"
+#include "mojo/public/c/gpu/MGL/mgl_onscreen.h"
#include "mojo/public/c/system/buffer.h"
#include "mojo/public/c/system/data_pipe.h"
#include "mojo/public/c/system/message_pipe.h"
@@ -85,6 +87,28 @@ struct nacl_irt_mojo {
MojoResult (*_MojoGetInitialHandle)(MojoHandle* handle);
};
+#define NACL_IRT_MGL_v0_1 "nacl-irt-mgl-0.1"
+
+struct nacl_irt_mgl {
+ MGLContext (*MGLCreateContext)(MGLOpenGLAPIVersion version,
Mark Seaborn 2015/10/17 01:08:08 Can you add comments to document what these functi
Petr Hosek 2015/10/17 01:51:13 Done.
Mark Seaborn 2015/10/20 01:24:32 I suppose I should have put the emphasis on "point
+ MojoHandle command_buffer_handle,
+ MGLContext share_group,
+ MGLContextLostCallback lost_callback,
+ void* lost_callback_closure,
+ const struct MojoAsyncWaiter* async_waiter);
+ void (*MGLDestroyContext)(MGLContext context);
+ void (*MGLMakeCurrent)(MGLContext context);
+ MGLContext (*MGLGetCurrentContext)(void);
+ MGLMustCastToProperFunctionPointerType (*MGLGetProcAddress)(const char* name);
+};
+
+#define NACL_IRT_MGL_ONSCREEN_v0_1 "nacl-irt-mgl-onscreen-0.1"
+
+struct nacl_irt_mgl_onscreen {
+ void (*MGLResizeSurface)(uint32_t width, uint32_t height);
Mark Seaborn 2015/10/17 01:08:08 Same comment about docs... What surface does this
Petr Hosek 2015/10/17 01:51:13 Done.
+ void (*MGLSwapBuffers)(void);
+};
+
#ifdef __cplusplus
extern "C" {
#endif

Powered by Google App Engine
This is Rietveld 408576698