Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / mojo / public / platform / native / gles2_impl_chromium_texture_mailbox_thunks.h
blob839e4419a04ad2ae17ac7e0768ac3fa19eebcf4a
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.
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_
8 #include <stddef.h>
10 #include "mojo/public/c/gles2/chromium_texture_mailbox.h"
12 // Specifies the frozen API for the GLES2 CHROMIUM_texture_mailbox extension.
13 #pragma pack(push, 8)
14 struct MojoGLES2ImplChromiumTextureMailboxThunks {
15 size_t size; // Should be set to sizeof(*this).
17 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
18 ReturnType(*Function) PARAMETERS;
19 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autogen.h"
20 #undef VISIT_GL_CALL
22 #pragma pack(pop)
24 // Intended to be called from the embedder to get the embedder's implementation
25 // of GLES2.
26 inline MojoGLES2ImplChromiumTextureMailboxThunks
27 MojoMakeGLES2ImplChromiumTextureMailboxThunks() {
28 MojoGLES2ImplChromiumTextureMailboxThunks
29 gles2_impl_chromium_texture_mailbox_thunks = {
30 sizeof(MojoGLES2ImplChromiumTextureMailboxThunks),
31 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function,
32 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autogen.h"
33 #undef VISIT_GL_CALL
36 return gles2_impl_chromium_texture_mailbox_thunks;
39 // Use this type for the function found by dynamically discovering it in
40 // a DSO linked with mojo_system.
41 // The contents of |gles2_impl_chromium_texture_mailbox_thunks| are copied.
42 typedef size_t (*MojoSetGLES2ImplChromiumTextureMailboxThunksFn)(
43 const MojoGLES2ImplChromiumTextureMailboxThunks* thunks);
45 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_CHROMIUM_TEXTURE_MAILBOX_THUNKS_H_