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

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

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_ 5 #ifndef MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
6 #define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_ 6 #define MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "third_party/mojo/src/mojo/public/c/gles2/gles2.h" 10 #include "mojo/public/c/gles2/gles2.h"
11 11
12 // Like MojoGLES2ControlThunks, but specifies the frozen GLES2 API. Separated 12 // Like MojoGLES2ControlThunks, but specifies the frozen GLES2 API. Separated
13 // out as MojoGLES2ControlThunks may be modified and added to, but this 13 // out as MojoGLES2ControlThunks may be modified and added to, but this
14 // interface is frozen. 14 // interface is frozen.
15 #pragma pack(push, 8) 15 #pragma pack(push, 8)
16 struct MojoGLES2ImplThunks { 16 struct MojoGLES2ImplThunks {
17 size_t size; // Should be set to sizeof(MojoGLES2ImplThunks). 17 size_t size; // Should be set to sizeof(MojoGLES2ImplThunks).
18 18
19 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ 19 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
20 ReturnType(GL_APIENTRY *Function) PARAMETERS; 20 ReturnType(GL_APIENTRY *Function) PARAMETERS;
21 #include "third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_autogen.h" 21 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h"
22 #undef VISIT_GL_CALL 22 #undef VISIT_GL_CALL
23 }; 23 };
24 #pragma pack(pop) 24 #pragma pack(pop)
25 25
26 // Intended to be called from the embedder to get the embedder's implementation 26 // Intended to be called from the embedder to get the embedder's implementation
27 // of GLES2. 27 // of GLES2.
28 inline MojoGLES2ImplThunks MojoMakeGLES2ImplThunks() { 28 inline MojoGLES2ImplThunks MojoMakeGLES2ImplThunks() {
29 MojoGLES2ImplThunks gles2_impl_thunks = { 29 MojoGLES2ImplThunks gles2_impl_thunks = {
30 sizeof(MojoGLES2ImplThunks), 30 sizeof(MojoGLES2ImplThunks),
31 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function, 31 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) gl##Function,
32 #include "third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_autogen.h" 32 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h"
33 #undef VISIT_GL_CALL 33 #undef VISIT_GL_CALL
34 }; 34 };
35 35
36 return gles2_impl_thunks; 36 return gles2_impl_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. For example: 40 // a DSO linked with mojo_system. For example:
41 // MojoSetGLES2ImplThunksFn mojo_set_gles2_impl_thunks_fn = 41 // MojoSetGLES2ImplThunksFn mojo_set_gles2_impl_thunks_fn =
42 // reinterpret_cast<MojoSetGLES2ImplThunksFn>( 42 // reinterpret_cast<MojoSetGLES2ImplThunksFn>(
43 // app_library.GetFunctionPointer("MojoSetGLES2ImplThunks")); 43 // app_library.GetFunctionPointer("MojoSetGLES2ImplThunks"));
44 // The expected size of |gles2_impl_thunks| is returned. 44 // The expected size of |gles2_impl_thunks| is returned.
45 // The contents of |gles2_impl_thunks| are copied. 45 // The contents of |gles2_impl_thunks| are copied.
46 typedef size_t (*MojoSetGLES2ImplThunksFn)( 46 typedef size_t (*MojoSetGLES2ImplThunksFn)(
47 const MojoGLES2ImplThunks* gles2_impl_thunks); 47 const MojoGLES2ImplThunks* gles2_impl_thunks);
48 48
49 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_ 49 #endif // MOJO_PUBLIC_PLATFORM_NATIVE_GLES2_IMPL_THUNKS_H_
OLDNEW
« no previous file with comments | « mojo/public/platform/native/gles2_impl_chromium_extension_thunks.cc ('k') | mojo/public/platform/native/gles2_impl_thunks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698