diff options
author | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 13:30:43 +0000 |
---|---|---|
committer | backer@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 13:30:43 +0000 |
commit | 8b19cb98e2b19fd9955b3e28e54dd37636554248 (patch) | |
tree | 130c47e5c45137a1cbeb00022b2ef095d8a00640 /ui | |
parent | ffe36a88ef46e69b52b68773329bcb61747935a5 (diff) | |
download | chromium_src-8b19cb98e2b19fd9955b3e28e54dd37636554248.zip chromium_src-8b19cb98e2b19fd9955b3e28e54dd37636554248.tar.gz chromium_src-8b19cb98e2b19fd9955b3e28e54dd37636554248.tar.bz2 |
One less lock.
As of http://codereview.chromium.org/8476013/, InitializeGLBindings is only called from one thread in the browser, so this lock is unnecessary.
R=zmo@chromium.org
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8527026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/gl/gl_implementation_linux.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/ui/gfx/gl/gl_implementation_linux.cc b/ui/gfx/gl/gl_implementation_linux.cc index 17575cd..9819b2b 100644 --- a/ui/gfx/gl/gl_implementation_linux.cc +++ b/ui/gfx/gl/gl_implementation_linux.cc @@ -7,11 +7,9 @@ #include "base/base_paths.h" #include "base/command_line.h" #include "base/file_path.h" -#include "base/lazy_instance.h" #include "base/logging.h" #include "base/native_library.h" #include "base/path_service.h" -#include "base/synchronization/lock.h" #include "base/threading/thread_restrictions.h" #include "ui/gfx/gl/gl_bindings.h" #include "ui/gfx/gl/gl_implementation.h" @@ -46,14 +44,6 @@ base::NativeLibrary LoadLibrary(const char* filename) { return LoadLibrary(FilePath(filename)); } -// TODO(backer): Find a more principled (less heavy handed) way to prevent a -// race in the bindings initialization. -#if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(TOUCH_UI) -base::LazyInstance<base::Lock, - base::LeakyLazyInstanceTraits<base::Lock> > - g_lock = LAZY_INSTANCE_INITIALIZER; -#endif - } // namespace anonymous void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { @@ -67,9 +57,6 @@ void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { } bool InitializeGLBindings(GLImplementation implementation) { -#if (defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)) || defined(TOUCH_UI) - base::AutoLock locked(g_lock.Get()); -#endif // Prevent reinitialization with a different implementation. Once the gpu // unit tests have initialized with kGLImplementationMock, we don't want to // later switch to another GL implementation. |