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

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

Issue 453163002: Expose CHROMIUM_texture_mailbox/sync_point stubs in mojo public headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
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 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_THUNKS_H_ 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_THUNKS_H_
6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_THUNKS_H_ 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_THUNKS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "mojo/public/c/gles2/gles2.h" 10 #include "mojo/public/c/gles2/gles2.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Use this type for the function found by dynamically discovering it in 56 // Use this type for the function found by dynamically discovering it in
57 // a DSO linked with mojo_system. For example: 57 // a DSO linked with mojo_system. For example:
58 // MojoSetGLES2ControlThunksFn mojo_set_gles2_control_thunks_fn = 58 // MojoSetGLES2ControlThunksFn mojo_set_gles2_control_thunks_fn =
59 // reinterpret_cast<MojoSetGLES2ControlThunksFn>( 59 // reinterpret_cast<MojoSetGLES2ControlThunksFn>(
60 // app_library.GetFunctionPointer("MojoSetGLES2ControlThunks")); 60 // app_library.GetFunctionPointer("MojoSetGLES2ControlThunks"));
61 // The expected size of |gles2_control_thunks| is returned. 61 // The expected size of |gles2_control_thunks| is returned.
62 // The contents of |gles2_control_thunks| are copied. 62 // The contents of |gles2_control_thunks| are copied.
63 typedef size_t (*MojoSetGLES2ControlThunksFn)( 63 typedef size_t (*MojoSetGLES2ControlThunksFn)(
64 const MojoGLES2ControlThunks* gles2_control_thunks); 64 const MojoGLES2ControlThunks* gles2_control_thunks);
65 65
66 // -----------------------------------------------------------------------------
67
68 // Like MojoGLES2ControlThunks, but specifies the frozen GLES2 API. Separated
69 // out as MojoGLES2ControlThunks may be modified and added to, but this
70 // interface is frozen.
71 #pragma pack(push, 8)
72 struct MojoGLES2ImplThunks {
73 size_t size; // Should be set to sizeof(MojoGLES2ImplThunks).
74
75 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
76 ReturnType (*Function) PARAMETERS;
77 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h"
78 #undef VISIT_GL_CALL
79 };
80 #pragma pack(pop)
81
82 // Intended to be called from the embedder to get the embedder's implementation
83 // of GLES2.
84 inline MojoGLES2ImplThunks MojoMakeGLES2ImplThunks() {
85 MojoGLES2ImplThunks gles2_impl_thunks = {
86 sizeof(MojoGLES2ImplThunks),
87 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
88 gl##Function,
89 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h"
90 #undef VISIT_GL_CALL
91 };
92
93 return gles2_impl_thunks;
94 }
95
96 // Use this type for the function found by dynamically discovering it in
97 // a DSO linked with mojo_system. For example:
98 // MojoSetGLES2ImplThunksFn mojo_set_gles2_impl_thunks_fn =
99 // reinterpret_cast<MojoSetGLES2ImplThunksFn>(
100 // app_library.GetFunctionPointer("MojoSetGLES2ImplThunks"));
101 // The expected size of |gles2_impl_thunks| is returned.
102 // The contents of |gles2_impl_thunks| are copied.
103 typedef size_t (*MojoSetGLES2ImplThunksFn)(
104 const MojoGLES2ImplThunks* gles2_impl_thunks);
105
106 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_THUNKS_H_ 66 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_THUNKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698