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

Unified Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase 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 | « webkit/glue/webkit_glue.cc ('k') | webkit/plugins/npapi/plugin_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
index b1ff0c7df7c81eed83d35491254df9629f0d07ed..42fa3ef45aac3bab6592410970ae6ba0e1f3a970 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc
@@ -208,10 +208,10 @@ const int32 kTransferBufferSize = 1024 * 1024;
static base::LazyInstance<
std::set<WebGraphicsContext3DInProcessCommandBufferImpl*> >
- g_all_shared_contexts(base::LINKER_INITIALIZED);
+ g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER;
static base::LazyInstance<base::Lock,
base::LeakyLazyInstanceTraits<base::Lock> >
- g_all_shared_contexts_lock(base::LINKER_INITIALIZED);
+ g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER;
// Singleton used to initialize and terminate the gles2 library.
class GLES2Initializer {
@@ -230,8 +230,8 @@ class GLES2Initializer {
////////////////////////////////////////////////////////////////////////////////
-static base::LazyInstance<GLES2Initializer> g_gles2_initializer(
- base::LINKER_INITIALIZED);
+static base::LazyInstance<GLES2Initializer> g_gles2_initializer =
+ LAZY_INSTANCE_INITIALIZER;
} // namespace anonymous
@@ -297,8 +297,8 @@ GLInProcessContext* GLInProcessContext::CreateOffscreenContext(
// thread. In layout tests, any thread could call this function. GLES2Decoder,
// and in particular the GL implementations behind it, are not generally
// threadsafe, so we guard entry points with a mutex.
-static base::LazyInstance<base::Lock>
- g_decoder_lock(base::LINKER_INITIALIZED);
+static base::LazyInstance<base::Lock> g_decoder_lock =
+ LAZY_INSTANCE_INITIALIZER;
void GLInProcessContext::PumpCommands() {
base::AutoLock lock(g_decoder_lock.Get());
« no previous file with comments | « webkit/glue/webkit_glue.cc ('k') | webkit/plugins/npapi/plugin_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698