OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_ | 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_ |
6 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_ | 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_ |
7 | 7 |
| 8 #include <MGL/mgl_echo.h> |
8 #include <stddef.h> | 9 #include <stddef.h> |
9 | 10 |
10 #include "mojo/public/c/gpu/MGL/mgl_echo.h" | |
11 | |
12 // Structure used to bind the MGL echo interface DSO to those of the embedder. | 11 // Structure used to bind the MGL echo interface DSO to those of the embedder. |
13 // | 12 // |
14 // This is the ABI between the embedder and the DSO. It can only have new | 13 // This is the ABI between the embedder and the DSO. It can only have new |
15 // functions added to the end. No other changes are supported. | 14 // functions added to the end. No other changes are supported. |
16 #pragma pack(push, 8) | 15 #pragma pack(push, 8) |
17 struct MGLEchoThunks { | 16 struct MGLEchoThunks { |
18 size_t size; // Should be set to sizeof(MGLEchoThunks). | 17 size_t size; // Should be set to sizeof(MGLEchoThunks). |
19 | 18 |
20 void (*MGLEcho)(MGLEchoCallback callback, void* lost_callback_closure); | 19 void (*MGLEcho)(MGLEchoCallback callback, void* lost_callback_closure); |
21 }; | 20 }; |
(...skipping 16 matching lines...) Expand all Loading... |
38 // a DSO linked with mojo_system. For example: | 37 // a DSO linked with mojo_system. For example: |
39 // MojoSetMGLEchoThunksFn mojo_set_gles2_thunks_fn = | 38 // MojoSetMGLEchoThunksFn mojo_set_gles2_thunks_fn = |
40 // reinterpret_cast<MojoSetMGLEchoThunksFn>( | 39 // reinterpret_cast<MojoSetMGLEchoThunksFn>( |
41 // app_library.GetFunctionPointer("MojoSetMGLEchoThunks")); | 40 // app_library.GetFunctionPointer("MojoSetMGLEchoThunks")); |
42 // The expected size of |mgl_thunks| is returned. | 41 // The expected size of |mgl_thunks| is returned. |
43 // The contents of |mgl_thunks| are copied. | 42 // The contents of |mgl_thunks| are copied. |
44 typedef size_t (*MojoSetMGLEchoThunksFn)( | 43 typedef size_t (*MojoSetMGLEchoThunksFn)( |
45 const struct MGLEchoThunks* mgl_echo_thunks); | 44 const struct MGLEchoThunks* mgl_echo_thunks); |
46 | 45 |
47 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_ | 46 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_MGL_ECHO_THUNKS_H_ |
OLD | NEW |