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

Unified Diff: mojo/nacl/irt_mojo_nonsfi.cc

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/nacl/irt_mojo_nonsfi.cc
diff --git a/mojo/nacl/irt_mojo_nonsfi.cc b/mojo/nacl/irt_mojo_nonsfi.cc
index 29cb0b7fbe2ce9616c14da7199ed8f270b49f62d..8486a8d20f804dccc0b7c8e330a8ce91ab04e056 100644
--- a/mojo/nacl/irt_mojo_nonsfi.cc
+++ b/mojo/nacl/irt_mojo_nonsfi.cc
@@ -39,8 +39,25 @@ const struct nacl_irt_mojo kIrtMojo = {
_MojoGetInitialHandle,
};
+const struct nacl_irt_mgl kIrtMGL = {
+ MGLCreateContext,
+ MGLDestroyContext,
+ MGLMakeCurrent,
+ MGLGetCurrentContext,
+ MGLGetProcAddress,
+};
+
+const struct nacl_irt_mgl_onscreen kIrtMGLOnScreen = {
+ MGLResizeSurface,
+ MGLSwapBuffers,
+};
+
const struct nacl_irt_interface kIrtInterfaces[] = {
- {NACL_IRT_MOJO_v0_1, &kIrtMojo, sizeof(kIrtMojo), nullptr}};
+ {NACL_IRT_MOJO_v0_1, &kIrtMojo, sizeof(kIrtMojo), nullptr},
+ {NACL_IRT_MGL_v0_1, &kIrtMGL, sizeof(kIrtMGL), nullptr},
+ {NACL_IRT_MGL_ONSCREEN_v0_1, &kIrtMGLOnScreen, sizeof(kIrtMGLOnScreen),
+ nullptr},
+};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698