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

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

Issue 1258693003: mojo: add GL_APIENTRY (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
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_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNKS_H _ 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNKS_H _
6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNKS_H _ 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNKS_H _
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "mojo/public/c/gles2/chromium_texture_mailbox.h" 10 #include "mojo/public/c/gles2/chromium_texture_mailbox.h"
11 11
12 // Specifies the frozen API for the GLES2 CHROMIUM_texture_mailbox extension. 12 // Specifies the frozen API for the GLES2 CHROMIUM_texture_mailbox extension.
13 #pragma pack(push, 8) 13 #pragma pack(push, 8)
14 struct MojoGLES2ImplChromiumTextureMailboxThunks { 14 struct MojoGLES2ImplChromiumTextureMailboxThunks {
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(*Function) PARAMETERS; 18 ReturnType(GL_APIENTRY *Function) PARAMETERS;
19 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autoge n.h" 19 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autoge n.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 MojoGLES2ImplChromiumTextureMailboxThunks 26 inline MojoGLES2ImplChromiumTextureMailboxThunks
27 MojoMakeGLES2ImplChromiumTextureMailboxThunks() { 27 MojoMakeGLES2ImplChromiumTextureMailboxThunks() {
28 MojoGLES2ImplChromiumTextureMailboxThunks 28 MojoGLES2ImplChromiumTextureMailboxThunks
29 gles2_impl_chromium_texture_mailbox_thunks = { 29 gles2_impl_chromium_texture_mailbox_thunks = {
30 sizeof(MojoGLES2ImplChromiumTextureMailboxThunks), 30 sizeof(MojoGLES2ImplChromiumTextureMailboxThunks),
31 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function, 31 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function,
32 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autoge n.h" 32 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autoge n.h"
33 #undef VISIT_GL_CALL 33 #undef VISIT_GL_CALL
34 }; 34 };
35 35
36 return gles2_impl_chromium_texture_mailbox_thunks; 36 return gles2_impl_chromium_texture_mailbox_thunks;
37 } 37 }
38 38
39 // Use this type for the function found by dynamically discovering it in 39 // Use this type for the function found by dynamically discovering it in
40 // a DSO linked with mojo_system. 40 // a DSO linked with mojo_system.
41 // The contents of |gles2_impl_chromium_texture_mailbox_thunks| are copied. 41 // The contents of |gles2_impl_chromium_texture_mailbox_thunks| are copied.
42 typedef size_t (*MojoSetGLES2ImplChromiumTextureMailboxThunksFn)( 42 typedef size_t (*MojoSetGLES2ImplChromiumTextureMailboxThunksFn)(
43 const MojoGLES2ImplChromiumTextureMailboxThunks* thunks); 43 const MojoGLES2ImplChromiumTextureMailboxThunks* thunks);
44 44
45 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNK S_H_ 45 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNK S_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698