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

Unified Diff: ui/gfx/gl/gl_implementation_linux.cc

Issue 8527026: One less lock. (Closed) Base URL: svn://svn.chromium.org/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_implementation_linux.cc
diff --git a/ui/gfx/gl/gl_implementation_linux.cc b/ui/gfx/gl/gl_implementation_linux.cc
index 19d3482019cd96559fbd778dd0a0264ca18b2de2..03c12492caef0bb3e04e8309778bdc5ce2582050 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) {
@@ -63,9 +53,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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698