| 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 MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_ | 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_ |
| 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_ | 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_ |
| 7 | 7 |
| 8 #include <MGL/mgl.h> |
| 8 #include <stddef.h> | 9 #include <stddef.h> |
| 9 | 10 |
| 10 #include "mojo/public/c/gpu/MGL/mgl.h" | |
| 11 | |
| 12 // Structure used to bind the interface which manipulates MGL contexts to a | 11 // Structure used to bind the interface which manipulates MGL contexts to a |
| 13 // DSO to theose of the embedder. | 12 // DSO to theose of the embedder. |
| 14 // | 13 // |
| 15 // This is the ABI between the embedder and the DSO. It can only have new | 14 // This is the ABI between the embedder and the DSO. It can only have new |
| 16 // functions added to the end. No other changes are supported. | 15 // functions added to the end. No other changes are supported. |
| 17 #pragma pack(push, 8) | 16 #pragma pack(push, 8) |
| 18 struct MGLThunks { | 17 struct MGLThunks { |
| 19 size_t size; // Should be set to sizeof(MGLThunks). | 18 size_t size; // Should be set to sizeof(MGLThunks). |
| 20 | 19 |
| 21 MGLContext (*MGLCreateContext)(MGLOpenGLAPIVersion version, | 20 MGLContext (*MGLCreateContext)(MGLOpenGLAPIVersion version, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 49 // Use this type for the function found by dynamically discovering it in | 48 // Use this type for the function found by dynamically discovering it in |
| 50 // a DSO linked with mojo_system. For example: | 49 // a DSO linked with mojo_system. For example: |
| 51 // MojoSetMGLThunksFn mojo_set_gles2_thunks_fn = | 50 // MojoSetMGLThunksFn mojo_set_gles2_thunks_fn = |
| 52 // reinterpret_cast<MojoSetMGLThunksFn>( | 51 // reinterpret_cast<MojoSetMGLThunksFn>( |
| 53 // app_library.GetFunctionPointer("MojoSetMGLThunks")); | 52 // app_library.GetFunctionPointer("MojoSetMGLThunks")); |
| 54 // The expected size of |mgl_thunks| is returned. | 53 // The expected size of |mgl_thunks| is returned. |
| 55 // The contents of |mgl_thunks| are copied. | 54 // The contents of |mgl_thunks| are copied. |
| 56 typedef size_t (*MojoSetMGLThunksFn)(const struct MGLThunks* mgl_thunks); | 55 typedef size_t (*MojoSetMGLThunksFn)(const struct MGLThunks* mgl_thunks); |
| 57 | 56 |
| 58 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_ | 57 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_MGL_THUNKS_H_ |
| OLD | NEW |