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

Side by Side Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thakis comment, renamed LAZY_INSTANCE_INITIALIZER 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" 7 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include "gpu/GLES2/gl2.h" 9 #include "gpu/GLES2/gl2.h"
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 19 matching lines...) Expand all
30 #include "content/renderer/render_view_impl.h" 30 #include "content/renderer/render_view_impl.h"
31 #include "gpu/command_buffer/client/gles2_implementation.h" 31 #include "gpu/command_buffer/client/gles2_implementation.h"
32 #include "gpu/command_buffer/common/constants.h" 32 #include "gpu/command_buffer/common/constants.h"
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
36 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h" 36 #include "webkit/glue/gl_bindings_skia_cmd_buffer.h"
37 37
38 static base::LazyInstance<base::Lock, 38 static base::LazyInstance<base::Lock,
39 base::LeakyLazyInstanceTraits<base::Lock> > 39 base::LeakyLazyInstanceTraits<base::Lock> >
40 g_all_shared_contexts_lock(base::LINKER_INITIALIZED); 40 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER;
41 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> > 41 static base::LazyInstance<std::set<WebGraphicsContext3DCommandBufferImpl*> >
42 g_all_shared_contexts(base::LINKER_INITIALIZED); 42 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER;
43 43
44 WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl() 44 WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl()
45 : initialize_failed_(false), 45 : initialize_failed_(false),
46 context_(NULL), 46 context_(NULL),
47 gl_(NULL), 47 gl_(NULL),
48 web_view_(NULL), 48 web_view_(NULL),
49 #if defined(OS_MACOSX) 49 #if defined(OS_MACOSX)
50 plugin_handle_(NULL), 50 plugin_handle_(NULL),
51 #endif // defined(OS_MACOSX) 51 #endif // defined(OS_MACOSX)
52 context_lost_callback_(0), 52 context_lost_callback_(0),
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 if (context_lost_callback_) { 1170 if (context_lost_callback_) {
1171 context_lost_callback_->onContextLost(); 1171 context_lost_callback_->onContextLost();
1172 } 1172 }
1173 RenderViewImpl* renderview = 1173 RenderViewImpl* renderview =
1174 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL; 1174 web_view_ ? RenderViewImpl::FromWebView(web_view_) : NULL;
1175 if (renderview) 1175 if (renderview)
1176 renderview->OnViewContextSwapBuffersAborted(); 1176 renderview->OnViewContextSwapBuffersAborted();
1177 } 1177 }
1178 1178
1179 #endif // defined(ENABLE_GPU) 1179 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698