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

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

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 6 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 10 matching lines...) Expand all
21 namespace { 21 namespace {
22 22
23 const int32_t kNone = 0x3038; // EGL_NONE 23 const int32_t kNone = 0x3038; // EGL_NONE
24 24
25 base::LazyInstance<base::ThreadLocalPointer<gpu::gles2::GLES2Interface> >::Leaky 25 base::LazyInstance<base::ThreadLocalPointer<gpu::gles2::GLES2Interface> >::Leaky
26 g_gpu_interface; 26 g_gpu_interface;
27 27
28 } // namespace 28 } // namespace
29 29
30 extern "C" { 30 extern "C" {
31
31 MojoGLES2Context MojoGLES2CreateContext(MojoHandle handle, 32 MojoGLES2Context MojoGLES2CreateContext(MojoHandle handle,
32 const int32_t* attrib_list, 33 const int32_t* attrib_list,
33 MojoGLES2ContextLost lost_callback, 34 MojoGLES2ContextLost lost_callback,
34 void* closure) { 35 void* closure) {
35 mojo::MessagePipeHandle mph(handle); 36 mojo::MessagePipeHandle mph(handle);
36 mojo::ScopedMessagePipeHandle scoped_handle(mph); 37 mojo::ScopedMessagePipeHandle scoped_handle(mph);
37 std::vector<int32_t> attribs; 38 std::vector<int32_t> attribs;
38 if (attrib_list) { 39 if (attrib_list) {
39 for (int32_t const* p = attrib_list; *p != kNone;) { 40 for (int32_t const* p = attrib_list; *p != kNone;) {
40 attribs.push_back(*p++); 41 attribs.push_back(*p++);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ 80 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
80 ReturnType GL_APIENTRY gl##Function PARAMETERS { \ 81 ReturnType GL_APIENTRY gl##Function PARAMETERS { \
81 DCHECK(g_gpu_interface.Get().Get()); \ 82 DCHECK(g_gpu_interface.Get().Get()); \
82 return g_gpu_interface.Get().Get()->Function ARGUMENTS; \ 83 return g_gpu_interface.Get().Get()->Function ARGUMENTS; \
83 } 84 }
84 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h" 85 #include "mojo/public/c/gles2/gles2_call_visitor_autogen.h"
85 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h" 86 #include "mojo/public/c/gles2/gles2_call_visitor_chromium_extension_autogen.h"
86 #undef VISIT_GL_CALL 87 #undef VISIT_GL_CALL
87 88
88 } // extern "C" 89 } // extern "C"
OLDNEW
« components/mus/surfaces/surfaces_context_provider.cc ('K') | « media/gpu/ipc/service/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698