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

Unified Diff: mojo/shell/in_process_dynamic_service_runner.cc

Issue 413303002: mojo: Convert gles2 to the new thunking system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 5 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
« mojo/public/platform/native/gles2_thunks.h ('K') | « mojo/shell/context.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/in_process_dynamic_service_runner.cc
diff --git a/mojo/shell/in_process_dynamic_service_runner.cc b/mojo/shell/in_process_dynamic_service_runner.cc
index 3bfb163462ce500a29cc80b8d3d235397d6ea136..c0b5df98fd8804d33c0e6a3b7537d81f825b1234 100644
--- a/mojo/shell/in_process_dynamic_service_runner.cc
+++ b/mojo/shell/in_process_dynamic_service_runner.cc
@@ -9,6 +9,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "mojo/public/platform/native/gles2_thunks.h"
#include "mojo/public/platform/native/system_thunks.h"
namespace mojo {
@@ -86,6 +87,22 @@ void InProcessDynamicServiceRunner::Run() {
#endif
}
+ MojoSetGLES2ThunksFn mojo_set_gles2_thunks_fn =
+ reinterpret_cast<MojoSetGLES2ThunksFn>(app_library_.GetFunctionPointer(
+ "MojoSetGLES2Thunks"));
+ if (mojo_set_gles2_thunks_fn) {
+ MojoGLES2Thunks gles2_thunks = MojoMakeGLES2Thunks();
+ size_t expected_size = mojo_set_gles2_thunks_fn(&gles2_thunks);
+ if (expected_size > sizeof(MojoGLES2Thunks)) {
+ LOG(ERROR)
+ << "Invalid app library: expected MojoGLES2Thunks size: "
+ << expected_size;
+ break;
+ }
+ }
+ // Unlike system thunks, we don't warn on a lack of GLES2 thunks because
+ // not everything is a visual app.
+
typedef MojoResult (*MojoMainFunction)(MojoHandle);
MojoMainFunction main_function = reinterpret_cast<MojoMainFunction>(
app_library_.GetFunctionPointer("MojoMain"));
« mojo/public/platform/native/gles2_thunks.h ('K') | « mojo/shell/context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698