| OLD | NEW |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, | 52 base::LazyInstance<base::Lock, |
| 53 base::LeakyLazyInstanceTraits<base::Lock> > | 53 base::LeakyLazyInstanceTraits<base::Lock> > |
| 54 g_lock(base::LINKER_INITIALIZED); | 54 g_lock = LAZY_INSTANCE_INITIALIZER; |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 } // namespace anonymous | 57 } // namespace anonymous |
| 58 | 58 |
| 59 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { | 59 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { |
| 60 impls->push_back(kGLImplementationDesktopGL); | 60 impls->push_back(kGLImplementationDesktopGL); |
| 61 impls->push_back(kGLImplementationEGLGLES2); | 61 impls->push_back(kGLImplementationEGLGLES2); |
| 62 impls->push_back(kGLImplementationOSMesaGL); | 62 impls->push_back(kGLImplementationOSMesaGL); |
| 63 } | 63 } |
| 64 | 64 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 #if !defined(USE_WAYLAND) | 227 #if !defined(USE_WAYLAND) |
| 228 ClearGLBindingsGLX(); | 228 ClearGLBindingsGLX(); |
| 229 ClearGLBindingsOSMESA(); | 229 ClearGLBindingsOSMESA(); |
| 230 #endif | 230 #endif |
| 231 SetGLImplementation(kGLImplementationNone); | 231 SetGLImplementation(kGLImplementationNone); |
| 232 | 232 |
| 233 UnloadGLNativeLibraries(); | 233 UnloadGLNativeLibraries(); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace gfx | 236 } // namespace gfx |
| OLD | NEW |