OLD | NEW |
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 "shell/native_application_support.h" | 5 #include "shell/native_application_support.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
" | 10 #include "mojo/public/platform/native/gles2_impl_chromium_miscellaneous_thunks.h
" |
11 #include "mojo/public/platform/native/gles2_impl_chromium_resize_thunks.h" | 11 #include "mojo/public/platform/native/gles2_impl_chromium_resize_thunks.h" |
12 #include "mojo/public/platform/native/gles2_impl_chromium_sub_image_thunks.h" | 12 #include "mojo/public/platform/native/gles2_impl_chromium_sub_image_thunks.h" |
13 #include "mojo/public/platform/native/gles2_impl_chromium_sync_point_thunks.h" | 13 #include "mojo/public/platform/native/gles2_impl_chromium_sync_point_thunks.h" |
14 #include "mojo/public/platform/native/gles2_impl_chromium_texture_mailbox_thunks
.h" | 14 #include "mojo/public/platform/native/gles2_impl_chromium_texture_mailbox_thunks
.h" |
| 15 #include "mojo/public/platform/native/gles2_impl_ext_debug_marker_thunks.h" |
15 #include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h" | 16 #include "mojo/public/platform/native/gles2_impl_occlusion_query_ext_thunks.h" |
16 #include "mojo/public/platform/native/gles2_impl_oes_vertex_array_object_thunks.
h" | 17 #include "mojo/public/platform/native/gles2_impl_oes_vertex_array_object_thunks.
h" |
17 #include "mojo/public/platform/native/gles2_impl_thunks.h" | 18 #include "mojo/public/platform/native/gles2_impl_thunks.h" |
18 #include "mojo/public/platform/native/gles2_thunks.h" | 19 #include "mojo/public/platform/native/gles2_thunks.h" |
19 #include "mojo/public/platform/native/system_impl_private_thunks.h" | 20 #include "mojo/public/platform/native/system_impl_private_thunks.h" |
20 #include "mojo/public/platform/native/system_thunks.h" | 21 #include "mojo/public/platform/native/system_thunks.h" |
21 | 22 |
22 namespace shell { | 23 namespace shell { |
23 | 24 |
24 namespace { | 25 namespace { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks", | 80 if (!SetThunks(&MojoMakeGLES2ImplThunks, "MojoSetGLES2ImplThunks", |
80 app_library)) { | 81 app_library)) { |
81 LOG(ERROR) | 82 LOG(ERROR) |
82 << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks"; | 83 << "MojoSetGLES2ControlThunks found, but not MojoSetGLES2ImplThunks"; |
83 return false; | 84 return false; |
84 } | 85 } |
85 | 86 |
86 // If the application is using GLES2 extension points, register those | 87 // If the application is using GLES2 extension points, register those |
87 // thunks. Applications may use or not use any of these, so don't warn if | 88 // thunks. Applications may use or not use any of these, so don't warn if |
88 // they are missing. | 89 // they are missing. |
| 90 SetThunks(MojoMakeGLES2ImplExtDebugMarkerThunks, |
| 91 "MojoSetGLES2ImplExtDebugMarkerThunks", app_library); |
89 SetThunks(MojoMakeGLES2ImplOcclusionQueryExtThunks, | 92 SetThunks(MojoMakeGLES2ImplOcclusionQueryExtThunks, |
90 "MojoSetGLES2ImplOcclusionQueryExtThunks", app_library); | 93 "MojoSetGLES2ImplOcclusionQueryExtThunks", app_library); |
91 SetThunks(MojoMakeGLES2ImplOesVertexArrayObjectThunks, | 94 SetThunks(MojoMakeGLES2ImplOesVertexArrayObjectThunks, |
92 "MojoSetGLES2ImplOesVertexArrayObjectThunks", app_library); | 95 "MojoSetGLES2ImplOesVertexArrayObjectThunks", app_library); |
93 // "Chromium" extensions: | 96 // "Chromium" extensions: |
94 SetThunks(MojoMakeGLES2ImplChromiumMiscellaneousThunks, | 97 SetThunks(MojoMakeGLES2ImplChromiumMiscellaneousThunks, |
95 "MojoSetGLES2ImplChromiumMiscellaneousThunks", app_library); | 98 "MojoSetGLES2ImplChromiumMiscellaneousThunks", app_library); |
96 SetThunks(MojoMakeGLES2ImplChromiumResizeThunks, | 99 SetThunks(MojoMakeGLES2ImplChromiumResizeThunks, |
97 "MojoSetGLES2ImplChromiumResizeThunks", app_library); | 100 "MojoSetGLES2ImplChromiumResizeThunks", app_library); |
98 SetThunks(MojoMakeGLES2ImplChromiumSubImageThunks, | 101 SetThunks(MojoMakeGLES2ImplChromiumSubImageThunks, |
(...skipping 25 matching lines...) Expand all Loading... |
124 } | 127 } |
125 // |MojoMain()| takes ownership of the Application request handle. | 128 // |MojoMain()| takes ownership of the Application request handle. |
126 MojoHandle handle = application_request.PassMessagePipe().release().value(); | 129 MojoHandle handle = application_request.PassMessagePipe().release().value(); |
127 MojoResult result = main_function(handle); | 130 MojoResult result = main_function(handle); |
128 LOG_IF(ERROR, result != MOJO_RESULT_OK) | 131 LOG_IF(ERROR, result != MOJO_RESULT_OK) |
129 << "MojoMain returned error (result: " << result << ")"; | 132 << "MojoMain returned error (result: " << result << ")"; |
130 return true; | 133 return true; |
131 } | 134 } |
132 | 135 |
133 } // namespace shell | 136 } // namespace shell |
OLD | NEW |