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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc

Issue 9117038: Convert all remaining explicit LeakyLazyInstanceTraits users to ::Leaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 months 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
« no previous file with comments | « webkit/glue/worker_task_runner.cc ('k') | webkit/plugins/npapi/webplugin_ime_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" 7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 namespace { 200 namespace {
201 201
202 const int32 kCommandBufferSize = 1024 * 1024; 202 const int32 kCommandBufferSize = 1024 * 1024;
203 // TODO(kbr): make the transfer buffer size configurable via context 203 // TODO(kbr): make the transfer buffer size configurable via context
204 // creation attributes. 204 // creation attributes.
205 const int32 kTransferBufferSize = 1024 * 1024; 205 const int32 kTransferBufferSize = 1024 * 1024;
206 206
207 static base::LazyInstance< 207 static base::LazyInstance<
208 std::set<WebGraphicsContext3DInProcessCommandBufferImpl*> > 208 std::set<WebGraphicsContext3DInProcessCommandBufferImpl*> >
209 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER; 209 g_all_shared_contexts = LAZY_INSTANCE_INITIALIZER;
210 static base::LazyInstance<base::Lock, 210 static base::LazyInstance<base::Lock>::Leaky
211 base::LeakyLazyInstanceTraits<base::Lock> >
212 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER; 211 g_all_shared_contexts_lock = LAZY_INSTANCE_INITIALIZER;
213 212
214 // Singleton used to initialize and terminate the gles2 library. 213 // Singleton used to initialize and terminate the gles2 library.
215 class GLES2Initializer { 214 class GLES2Initializer {
216 public: 215 public:
217 GLES2Initializer() { 216 GLES2Initializer() {
218 gles2::Initialize(); 217 gles2::Initialize();
219 } 218 }
220 219
221 ~GLES2Initializer() { 220 ~GLES2Initializer() {
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; 1669 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB;
1671 if (context_lost_callback_) { 1670 if (context_lost_callback_) {
1672 context_lost_callback_->onContextLost(); 1671 context_lost_callback_->onContextLost();
1673 } 1672 }
1674 } 1673 }
1675 1674
1676 } // namespace gpu 1675 } // namespace gpu
1677 } // namespace webkit 1676 } // namespace webkit
1678 1677
1679 #endif // defined(ENABLE_GPU) 1678 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « webkit/glue/worker_task_runner.cc ('k') | webkit/plugins/npapi/webplugin_ime_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698