OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_EXT
ENSION_THUNKS_H_ | 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_EXTENSION_THUNKS_H_ |
6 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_EXT
ENSION_THUNKS_H_ | 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_EXTENSION_THUNKS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "third_party/mojo/src/mojo/public/c/gles2/chromium_extension.h" | 10 #include "mojo/public/c/gles2/chromium_extension.h" |
11 | 11 |
12 // Specifies the API for the GLES2 CHROMIUM extension. | 12 // Specifies the API for the GLES2 CHROMIUM extension. |
13 #pragma pack(push, 8) | 13 #pragma pack(push, 8) |
14 struct MojoGLES2ImplChromiumExtensionThunks { | 14 struct MojoGLES2ImplChromiumExtensionThunks { |
15 size_t size; // Should be set to sizeof(*this). | 15 size_t size; // Should be set to sizeof(*this). |
16 | 16 |
17 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ | 17 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ |
18 ReturnType(GL_APIENTRY *Function) PARAMETERS; | 18 ReturnType(GL_APIENTRY *Function) PARAMETERS; |
19 #include "third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_e
xtension_autogen.h" | 19 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h" |
20 #undef VISIT_GL_CALL | 20 #undef VISIT_GL_CALL |
21 }; | 21 }; |
22 #pragma pack(pop) | 22 #pragma pack(pop) |
23 | 23 |
24 // Intended to be called from the embedder to get the embedder's implementation | 24 // Intended to be called from the embedder to get the embedder's implementation |
25 // of GLES2. | 25 // of GLES2. |
26 inline MojoGLES2ImplChromiumExtensionThunks | 26 inline MojoGLES2ImplChromiumExtensionThunks |
27 MojoMakeGLES2ImplChromiumExtensionThunks() { | 27 MojoMakeGLES2ImplChromiumExtensionThunks() { |
28 MojoGLES2ImplChromiumExtensionThunks gles2_impl_chromium_extension_thunks = { | 28 MojoGLES2ImplChromiumExtensionThunks gles2_impl_chromium_extension_thunks = { |
29 sizeof(MojoGLES2ImplChromiumExtensionThunks), | 29 sizeof(MojoGLES2ImplChromiumExtensionThunks), |
30 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function, | 30 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function, |
31 #include "third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_e
xtension_autogen.h" | 31 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h" |
32 #undef VISIT_GL_CALL | 32 #undef VISIT_GL_CALL |
33 }; | 33 }; |
34 | 34 |
35 return gles2_impl_chromium_extension_thunks; | 35 return gles2_impl_chromium_extension_thunks; |
36 } | 36 } |
37 | 37 |
38 // Use this type for the function found by dynamically discovering it in | 38 // Use this type for the function found by dynamically discovering it in |
39 // a DSO linked with mojo_system. | 39 // a DSO linked with mojo_system. |
40 // The contents of |gles2_impl_chromium_extension_thunks| are copied. | 40 // The contents of |gles2_impl_chromium_extension_thunks| are copied. |
41 typedef size_t (*MojoSetGLES2ImplChromiumExtensionThunksFn)( | 41 typedef size_t (*MojoSetGLES2ImplChromiumExtensionThunksFn)( |
42 const MojoGLES2ImplChromiumExtensionThunks* thunks); | 42 const MojoGLES2ImplChromiumExtensionThunks* thunks); |
43 | 43 |
44 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_
EXTENSION_THUNKS_H_ | 44 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_EXTENSION_THUNKS_H_ |
OLD | NEW |