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

Side by Side Diff: ui/gfx/gl/gl_implementation_linux.cc

Issue 8430019: Make LazyInstance managed Locks leaky. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 5 #include <vector>
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return library; 42 return library;
43 } 43 }
44 44
45 base::NativeLibrary LoadLibrary(const char* filename) { 45 base::NativeLibrary LoadLibrary(const char* filename) {
46 return LoadLibrary(FilePath(filename)); 46 return LoadLibrary(FilePath(filename));
47 } 47 }
48 48
49 // TODO(backer): Find a more principled (less heavy handed) way to prevent a 49 // TODO(backer): Find a more principled (less heavy handed) way to prevent a
50 // race in the bindings initialization. 50 // race in the bindings initialization.
51 #if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(TOUCH_UI) 51 #if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(TOUCH_UI)
52 base::LazyInstance<base::Lock> g_lock(base::LINKER_INITIALIZED); 52 base::LazyInstance<base::Lock,
53 base::LeakyLazyInstanceTraits<base::Lock> >
54 g_lock(base::LINKER_INITIALIZED);
53 #endif 55 #endif
54 56
55 } // namespace anonymous 57 } // namespace anonymous
56 58
57 bool InitializeGLBindings(GLImplementation implementation) { 59 bool InitializeGLBindings(GLImplementation implementation) {
58 #if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(TOUCH_UI) 60 #if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(TOUCH_UI)
59 base::AutoLock locked(g_lock.Get()); 61 base::AutoLock locked(g_lock.Get());
60 #endif 62 #endif
61 // Prevent reinitialization with a different implementation. Once the gpu 63 // Prevent reinitialization with a different implementation. Once the gpu
62 // unit tests have initialized with kGLImplementationMock, we don't want to 64 // unit tests have initialized with kGLImplementationMock, we don't want to
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void InitializeDebugGLBindings() { 209 void InitializeDebugGLBindings() {
208 InitializeDebugGLBindingsEGL(); 210 InitializeDebugGLBindingsEGL();
209 InitializeDebugGLBindingsGL(); 211 InitializeDebugGLBindingsGL();
210 #if !defined(USE_WAYLAND) 212 #if !defined(USE_WAYLAND)
211 InitializeDebugGLBindingsGLX(); 213 InitializeDebugGLBindingsGLX();
212 InitializeDebugGLBindingsOSMESA(); 214 InitializeDebugGLBindingsOSMESA();
213 #endif 215 #endif
214 } 216 }
215 217
216 } // namespace gfx 218 } // namespace gfx
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_thread_win.cc ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698