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

Side by Side Diff: mojo/runner/native_application_support.cc

Issue 1349233002: Mandoline: Enable more GL commands which are used by WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review issue Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « mojo/gpu/mojo_gles2_impl_autogen.cc ('k') | third_party/mojo/src/mojo/public/c/gles2/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/runner/native_application_support.h" 5 #include "mojo/runner/native_application_support.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "mojo/platform_handle/platform_handle_private_thunks.h" 11 #include "mojo/platform_handle/platform_handle_private_thunks.h"
12 #include "mojo/public/platform/native/gles2_impl_chromium_copy_texture_thunks.h" 12 #include "mojo/public/platform/native/gles2_impl_chromium_extension_thunks.h"
13 #include "mojo/public/platform/native/gles2_impl_chromium_framebuffer_multisampl e_thunks.h"
14 #include "mojo/public/platform/native/gles2_impl_chromium_image_thunks.h"
15 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h "
16 #include "mojo/public/platform/native/gles2_impl_chromium_pixel_transfer_buffer_ object_thunks.h"
17 #include "mojo/public/platform/native/gles2_impl_chromium_sub_image_thunks.h"
18 #include "mojo/public/platform/native/gles2_impl_chromium_sync_point_thunks.h"
19 #include "mojo/public/platform/native/gles2_impl_chromium_texture_mailbox_thunks .h"
20 #include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h"
21 #include "mojo/public/platform/native/gles2_impl_thunks.h" 13 #include "mojo/public/platform/native/gles2_impl_thunks.h"
22 #include "mojo/public/platform/native/gles2_thunks.h" 14 #include "mojo/public/platform/native/gles2_thunks.h"
23 #include "mojo/public/platform/native/system_thunks.h" 15 #include "mojo/public/platform/native/system_thunks.h"
24 16
25 namespace mojo { 17 namespace mojo {
26 namespace runner { 18 namespace runner {
27 19
28 namespace { 20 namespace {
29 21
30 template <typename Thunks> 22 template <typename Thunks>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks", 68 if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks",
77 app_library)) { 69 app_library)) {
78 LOG(ERROR) 70 LOG(ERROR)
79 << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks"; 71 << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks";
80 return false; 72 return false;
81 } 73 }
82 74
83 // If the application is using GLES2 extension points, register those 75 // If the application is using GLES2 extension points, register those
84 // thunks. Applications may use or not use any of these, so don't warn if 76 // thunks. Applications may use or not use any of these, so don't warn if
85 // they are missing. 77 // they are missing.
86 SetThunks(MojoMakeGLES2ImplChromiumCopyTextureThunks, 78 SetThunks(MojoMakeGLES2ImplChromiumExtensionThunks,
87 "MojoSetGLES2ImplChromiumCopyTextureThunks", app_library); 79 "MojoSetGLES2ImplChromiumExtensionThunks", app_library);
88 SetThunks(MojoMakeGLES2ImplChromiumFramebufferMultisampleThunks,
89 "MojoSetGLES2ImplChromiumFramebufferMultisampleThunks",
90 app_library);
91 SetThunks(MojoMakeGLES2ImplChromiumImageThunks,
92 "MojoSetGLES2ImplChromiumImageThunks", app_library);
93 SetThunks(MojoMakeGLES2ImplChromiumMiscellaneousThunks,
94 "MojoSetGLES2ImplChromiumMiscellaneousThunks", app_library);
95 SetThunks(MojoMakeGLES2ImplChromiumPixelTransferBufferObjectThunks,
96 "MojoSetGLES2ImplChromiumPixelTransferBufferObjectThunks", app_lib rary);
97 SetThunks(MojoMakeGLES2ImplChromiumSubImageThunks,
98 "MojoSetGLES2ImplChromiumSubImageThunks", app_library);
99 SetThunks(MojoMakeGLES2ImplChromiumTextureMailboxThunks,
100 "MojoSetGLES2ImplChromiumTextureMailboxThunks", app_library);
101 SetThunks(MojoMakeGLES2ImplChromiumSyncPointThunks,
102 "MojoSetGLES2ImplChromiumSyncPointThunks", app_library);
103 SetThunks(MojoMakeGLES2ImplOcclusionQueryExtThunks,
104 "MojoSetGLES2ImplOcclusionQueryExtThunks", app_library);
105 } 80 }
106 // Unlike system thunks, we don't warn on a lack of GLES2 thunks because 81 // Unlike system thunks, we don't warn on a lack of GLES2 thunks because
107 // not everything is a visual app. 82 // not everything is a visual app.
108 83
109 // Go shared library support requires us to initialize the runtime before we 84 // Go shared library support requires us to initialize the runtime before we
110 // start running any go code. This is a temporary patch. 85 // start running any go code. This is a temporary patch.
111 typedef void (*InitGoRuntimeFn)(); 86 typedef void (*InitGoRuntimeFn)();
112 InitGoRuntimeFn init_go_runtime = reinterpret_cast<InitGoRuntimeFn>( 87 InitGoRuntimeFn init_go_runtime = reinterpret_cast<InitGoRuntimeFn>(
113 base::GetFunctionPointerFromNativeLibrary(app_library, "InitGoRuntime")); 88 base::GetFunctionPointerFromNativeLibrary(app_library, "InitGoRuntime"));
114 if (init_go_runtime) { 89 if (init_go_runtime) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 MojoHandle handle = application_request.PassMessagePipe().release().value(); 126 MojoHandle handle = application_request.PassMessagePipe().release().value();
152 MojoResult result = main_function(handle); 127 MojoResult result = main_function(handle);
153 if (result != MOJO_RESULT_OK) { 128 if (result != MOJO_RESULT_OK) {
154 LOG(ERROR) << "MojoMain returned error (result: " << result << ")"; 129 LOG(ERROR) << "MojoMain returned error (result: " << result << ")";
155 } 130 }
156 return true; 131 return true;
157 } 132 }
158 133
159 } // namespace runner 134 } // namespace runner
160 } // namespace mojo 135 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/gpu/mojo_gles2_impl_autogen.cc ('k') | third_party/mojo/src/mojo/public/c/gles2/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698