OLD | NEW |
---|---|
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 #include "mojo/public/c/gles2/gles2.h" | 5 #include "mojo/public/c/gles2/gles2.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/threading/thread_local.h" | 8 #include "base/threading/thread_local.h" |
9 #include "gpu/GLES2/gl2extchromium.h" | |
jamesr
2014/08/13 04:54:17
i added this and the GL_GLEXT_PROTOTYPES define to
| |
9 #include "gpu/command_buffer/client/gles2_interface.h" | 10 #include "gpu/command_buffer/client/gles2_interface.h" |
10 #include "mojo/gles2/gles2_context.h" | 11 #include "mojo/gles2/gles2_context.h" |
11 | 12 |
12 using mojo::gles2::GLES2Context; | 13 using mojo::gles2::GLES2Context; |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 base::LazyInstance<base::ThreadLocalPointer<gpu::gles2::GLES2Interface> >::Leaky | 17 base::LazyInstance<base::ThreadLocalPointer<gpu::gles2::GLES2Interface> >::Leaky |
17 g_gpu_interface; | 18 g_gpu_interface; |
18 | 19 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 void* MojoGLES2GetContextSupport(MojoGLES2Context context) { | 59 void* MojoGLES2GetContextSupport(MojoGLES2Context context) { |
59 return static_cast<GLES2Context*>(context)->context_support(); | 60 return static_cast<GLES2Context*>(context)->context_support(); |
60 } | 61 } |
61 | 62 |
62 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ | 63 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ |
63 ReturnType gl##Function PARAMETERS { \ | 64 ReturnType gl##Function PARAMETERS { \ |
64 DCHECK(g_gpu_interface.Get().Get()); \ | 65 DCHECK(g_gpu_interface.Get().Get()); \ |
65 return g_gpu_interface.Get().Get()->Function ARGUMENTS; \ | 66 return g_gpu_interface.Get().Get()->Function ARGUMENTS; \ |
66 } | 67 } |
67 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h" | 68 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h" |
69 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_sync_point_autogen.h" | |
70 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_texture_mailbox_autoge n.h" | |
68 #undef VISIT_GL_CALL | 71 #undef VISIT_GL_CALL |
69 | 72 |
70 } // extern "C" | 73 } // extern "C" |
OLD | NEW |