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

Side by Side Diff: mojo/gles2/gles2_support_impl.cc

Issue 218193002: Mojo: Move C gles2 header files to mojo/public/c/gles2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 9 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
« no previous file with comments | « mojo/gles2/gles2_context.cc ('k') | mojo/mojo_public.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "mojo/gles2/gles2_support_impl.h" 5 #include "mojo/gles2/gles2_support_impl.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "gpu/command_buffer/client/gles2_interface.h" 8 #include "gpu/command_buffer/client/gles2_interface.h"
9 #include "mojo/gles2/gles2_context.h" 9 #include "mojo/gles2/gles2_context.h"
10 #include "mojo/public/gles2/gles2_interface.h" 10 #include "mojo/public/gles2/gles2_interface.h"
(...skipping 10 matching lines...) Expand all
21 21
22 void set_gpu_interface(gpu::gles2::GLES2Interface* gpu_interface) { 22 void set_gpu_interface(gpu::gles2::GLES2Interface* gpu_interface) {
23 gpu_interface_ = gpu_interface; 23 gpu_interface_ = gpu_interface;
24 } 24 }
25 gpu::gles2::GLES2Interface* gpu_interface() const { return gpu_interface_; } 25 gpu::gles2::GLES2Interface* gpu_interface() const { return gpu_interface_; }
26 26
27 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ 27 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
28 virtual ReturnType Function PARAMETERS OVERRIDE { \ 28 virtual ReturnType Function PARAMETERS OVERRIDE { \
29 return gpu_interface_->Function ARGUMENTS; \ 29 return gpu_interface_->Function ARGUMENTS; \
30 } 30 }
31 #include "mojo/public/gles2/gles2_call_visitor_autogen.h" 31 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h"
32 #undef VISIT_GL_CALL 32 #undef VISIT_GL_CALL
33 33
34 private: 34 private:
35 gpu::gles2::GLES2Interface* gpu_interface_; 35 gpu::gles2::GLES2Interface* gpu_interface_;
36 DISALLOW_COPY_AND_ASSIGN(GLES2ImplForCommandBuffer); 36 DISALLOW_COPY_AND_ASSIGN(GLES2ImplForCommandBuffer);
37 }; 37 };
38 38
39 base::LazyInstance<GLES2ImplForCommandBuffer> g_gles2_interface = 39 base::LazyInstance<GLES2ImplForCommandBuffer> g_gles2_interface =
40 LAZY_INSTANCE_INITIALIZER; 40 LAZY_INSTANCE_INITIALIZER;
41 41
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void* GLES2SupportImpl::GetContextSupport(MojoGLES2Context context) { 107 void* GLES2SupportImpl::GetContextSupport(MojoGLES2Context context) {
108 return static_cast<GLES2Context*>(context)->context_support(); 108 return static_cast<GLES2Context*>(context)->context_support();
109 } 109 }
110 110
111 GLES2Interface* GLES2SupportImpl::GetGLES2InterfaceForCurrentContext() { 111 GLES2Interface* GLES2SupportImpl::GetGLES2InterfaceForCurrentContext() {
112 return &g_gles2_interface.Get(); 112 return &g_gles2_interface.Get();
113 } 113 }
114 114
115 } // namespace gles2 115 } // namespace gles2
116 } // namespace mojo 116 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/gles2/gles2_context.cc ('k') | mojo/mojo_public.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698