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

Unified Diff: mojo/nacl/nonsfi/irt_mojo_nonsfi.cc

Issue 1413683003: Expose MGL interface through NaCl IRT (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Review feedback addressed 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/nonsfi/irt_mojo_nonsfi.cc
diff --git a/mojo/nacl/nonsfi/irt_mojo_nonsfi.cc b/mojo/nacl/nonsfi/irt_mojo_nonsfi.cc
index a63189b6c6484454d03e133895b772d4e0f67012..ae3190ed9e5e95218321076fbe4dbadd1a80c8b8 100644
--- a/mojo/nacl/nonsfi/irt_mojo_nonsfi.cc
+++ b/mojo/nacl/nonsfi/irt_mojo_nonsfi.cc
@@ -39,8 +39,31 @@ 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_mgl_signal_sync_point kIrtMGLSignalSyncPoint = {
+ MGLSignalSyncPoint,
+};
+
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},
+ {NACL_IRT_MGL_SIGNAL_SYNC_POINT_v0_1, &kIrtMGLSignalSyncPoint,
+ sizeof(kIrtMGLSignalSyncPoint), nullptr},
+};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698