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

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

Issue 1686953003: Remove uses of base/lazy_instance (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/control_thunks_impl.h" 5 #include "mojo/gles2/control_thunks_impl.h"
6 6
7 #include "mojo/gles2/gles2_context.h" 7 #include "mojo/gles2/gles2_context.h"
8 #include "mojo/public/cpp/system/message_pipe.h" 8 #include "mojo/public/cpp/system/message_pipe.h"
9 9
10 extern "C" { 10 extern "C" {
11 11
12 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ 12 #define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \
13 ReturnType MojoGLES2gl##Function PARAMETERS; 13 ReturnType MojoGLES2gl##Function PARAMETERS;
14 #include "mojo/public/platform/native/gles2/call_visitor.h" 14 #include "mojo/public/platform/native/gles2/call_visitor.h"
15 #undef VISIT_GL_CALL 15 #undef VISIT_GL_CALL
16 16
17 } 17 }
18 18
19 namespace gles2 { 19 namespace gles2 {
20 20
21 // static 21 // static
22 ControlThunksImpl* ControlThunksImpl::Get() { 22 ControlThunksImpl* ControlThunksImpl::Get() {
23 static base::LazyInstance<ControlThunksImpl>::Leaky thunks; 23 static auto* thunks = new ControlThunksImpl;
24 return thunks.Pointer(); 24 return thunks;
25 } 25 }
26 26
27 MGLContext ControlThunksImpl::CreateContext( 27 MGLContext ControlThunksImpl::CreateContext(
28 MGLOpenGLAPIVersion version, 28 MGLOpenGLAPIVersion version,
29 MojoHandle command_buffer_handle, 29 MojoHandle command_buffer_handle,
30 MGLContext share_group, 30 MGLContext share_group,
31 MGLContextLostCallback lost_callback, 31 MGLContextLostCallback lost_callback,
32 void* lost_callback_closure, 32 void* lost_callback_closure,
33 const struct MojoAsyncWaiter* async_waiter) { 33 const struct MojoAsyncWaiter* async_waiter) {
34 mojo::MessagePipeHandle mph(command_buffer_handle); 34 mojo::MessagePipeHandle mph(command_buffer_handle);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return current_context_tls_.Get()->interface(); 93 return current_context_tls_.Get()->interface();
94 } 94 }
95 95
96 ControlThunksImpl::ControlThunksImpl() { 96 ControlThunksImpl::ControlThunksImpl() {
97 } 97 }
98 98
99 ControlThunksImpl::~ControlThunksImpl() { 99 ControlThunksImpl::~ControlThunksImpl() {
100 } 100 }
101 101
102 } // namespace gles2 102 } // namespace gles2
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698