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

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
« no previous file with comments | « mojo/nacl/nonsfi/BUILD.gn ('k') | mojo/nacl/sfi/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4fed496dda4c831685e0759dcf5b0b5efc30f5ad 100644
--- a/mojo/nacl/nonsfi/irt_mojo_nonsfi.cc
+++ b/mojo/nacl/nonsfi/irt_mojo_nonsfi.cc
@@ -5,6 +5,7 @@
#include "mojo/nacl/nonsfi/irt_mojo_nonsfi.h"
#include "mojo/public/c/system/functions.h"
+#include "mojo/public/platform/nacl/mgl_irt.h"
#include "mojo/public/platform/nacl/mojo_irt.h"
#include "native_client/src/public/irt_core.h"
@@ -39,8 +40,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
« no previous file with comments | « mojo/nacl/nonsfi/BUILD.gn ('k') | mojo/nacl/sfi/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698