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

Side by Side Diff: mojo/public/platform/native/gles2_impl_thunks.h

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
7
8 #include <GLES2/gl2.h>
9 #include <stddef.h>
10
11 // Like MojoGLES2ControlThunks, but specifies the frozen GLES2 API. Separated
12 // out as MojoGLES2ControlThunks may be modified and added to, but this
13 // interface is frozen.
14 #pragma pack(push, 8)
15 struct MojoGLES2ImplThunks {
16 size_t size; // Should be set to sizeof(MojoGLES2ImplThunks).
17
18 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
19 ReturnType(GL_APIENTRY *Function) PARAMETERS;
20 #include "mojo/public/platform/native/gles2/call_visitor_autogen.h"
21 #undef VISIT_GL_CALL
22 };
23 #pragma pack(pop)
24
25 // Intended to be called from the embedder to get the embedder's implementation
26 // of GLES2.
27 inline struct MojoGLES2ImplThunks MojoMakeGLES2ImplThunks() {
28 struct MojoGLES2ImplThunks gles2_impl_thunks = {
29 sizeof(struct MojoGLES2ImplThunks),
30 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function,
31 #include "mojo/public/platform/native/gles2/call_visitor_autogen.h"
32 #undef VISIT_GL_CALL
33 };
34
35 return gles2_impl_thunks;
36 }
37
38 // Use this type for the function found by dynamically discovering it in
39 // a DSO linked with mojo_system. For example:
40 // MojoSetGLES2ImplThunksFn mojo_set_gles2_impl_thunks_fn =
41 // reinterpret_cast<MojoSetGLES2ImplThunksFn>(
42 // app_library.GetFunctionPointer("MojoSetGLES2ImplThunks"));
43 // The expected size of |gles2_impl_thunks| is returned.
44 // The contents of |gles2_impl_thunks| are copied.
45 typedef size_t (*MojoSetGLES2ImplThunksFn)(
46 const struct MojoGLES2ImplThunks* gles2_impl_thunks);
47
48 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698