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

Unified Diff: shell/native_application_support.cc

Issue 1288583002: Add MGL entry points and port spinning_cube to use them (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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 | « shell/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/native_application_support.cc
diff --git a/shell/native_application_support.cc b/shell/native_application_support.cc
index d3887dcc50ca9bf5a4e5684d0f7489f24de0b6be..52ed8912eeeea1e5d721b49f2f78bed551cec398 100644
--- a/shell/native_application_support.cc
+++ b/shell/native_application_support.cc
@@ -17,6 +17,8 @@
#include "mojo/public/platform/native/gles2_impl_oes_vertex_array_object_thunks.h"
#include "mojo/public/platform/native/gles2_impl_thunks.h"
#include "mojo/public/platform/native/gles2_thunks.h"
+#include "mojo/public/platform/native/mgl_onscreen_thunks.h"
+#include "mojo/public/platform/native/mgl_thunks.h"
#include "mojo/public/platform/native/system_impl_private_thunks.h"
#include "mojo/public/platform/native/system_thunks.h"
@@ -73,38 +75,35 @@ bool RunNativeApplication(
SetThunks(&MojoMakeSystemImplThunksPrivate, "MojoSetSystemImplThunksPrivate",
app_library);
- if (SetThunks(&MojoMakeGLES2ControlThunks, "MojoSetGLES2ControlThunks",
- app_library)) {
- // If we have the control thunks, we should also have the GLES2
- // implementation thunks.
- if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks",
- app_library)) {
- LOG(ERROR)
- << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks";
- return false;
- }
-
- // If the application is using GLES2 extension points, register those
- // thunks. Applications may use or not use any of these, so don't warn if
- // they are missing.
- SetThunks(MojoMakeGLES2ImplExtDebugMarkerThunks,
- "MojoSetGLES2ImplExtDebugMarkerThunks", app_library);
- SetThunks(MojoMakeGLES2ImplOcclusionQueryExtThunks,
- "MojoSetGLES2ImplOcclusionQueryExtThunks", app_library);
- SetThunks(MojoMakeGLES2ImplOesVertexArrayObjectThunks,
- "MojoSetGLES2ImplOesVertexArrayObjectThunks", app_library);
- // "Chromium" extensions:
- SetThunks(MojoMakeGLES2ImplChromiumMiscellaneousThunks,
- "MojoSetGLES2ImplChromiumMiscellaneousThunks", app_library);
- SetThunks(MojoMakeGLES2ImplChromiumResizeThunks,
- "MojoSetGLES2ImplChromiumResizeThunks", app_library);
- SetThunks(MojoMakeGLES2ImplChromiumSubImageThunks,
- "MojoSetGLES2ImplChromiumSubImageThunks", app_library);
- SetThunks(MojoMakeGLES2ImplChromiumSyncPointThunks,
- "MojoSetGLES2ImplChromiumSyncPointThunks", app_library);
- SetThunks(MojoMakeGLES2ImplChromiumTextureMailboxThunks,
- "MojoSetGLES2ImplChromiumTextureMailboxThunks", app_library);
+ SetThunks(&MojoMakeGLES2ControlThunks, "MojoSetGLES2ControlThunks",
+ app_library);
+ SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks",
+ app_library);
+ SetThunks(MojoMakeGLES2ImplExtDebugMarkerThunks,
+ "MojoSetGLES2ImplExtDebugMarkerThunks", app_library);
+ SetThunks(MojoMakeGLES2ImplOcclusionQueryExtThunks,
+ "MojoSetGLES2ImplOcclusionQueryExtThunks", app_library);
+ SetThunks(MojoMakeGLES2ImplOesVertexArrayObjectThunks,
+ "MojoSetGLES2ImplOesVertexArrayObjectThunks", app_library);
+ // "Chromium" extensions:
+ SetThunks(MojoMakeGLES2ImplChromiumMiscellaneousThunks,
+ "MojoSetGLES2ImplChromiumMiscellaneousThunks", app_library);
+ SetThunks(MojoMakeGLES2ImplChromiumResizeThunks,
+ "MojoSetGLES2ImplChromiumResizeThunks", app_library);
+ SetThunks(MojoMakeGLES2ImplChromiumSubImageThunks,
+ "MojoSetGLES2ImplChromiumSubImageThunks", app_library);
+ SetThunks(MojoMakeGLES2ImplChromiumSyncPointThunks,
+ "MojoSetGLES2ImplChromiumSyncPointThunks", app_library);
+ SetThunks(MojoMakeGLES2ImplChromiumTextureMailboxThunks,
+ "MojoSetGLES2ImplChromiumTextureMailboxThunks", app_library);
+
+ if (SetThunks(MojoMakeMGLThunks, "MojoSetMGLThunks", app_library)) {
+ // TODO(jamesr): We should only need to expose these on apps that need to
+ // draw to the screen like the system compositor.
+ SetThunks(MojoMakeMGLOnscreenThunks, "MojoSetMGLOnscreenThunks",
+ app_library);
}
+
// Unlike system thunks, we don't warn on a lack of GLES2 thunks because
// not everything is a visual app.
« no previous file with comments | « shell/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698