diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 20:27:37 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 20:27:37 +0000 |
commit | 8cdcca3a40bffd4510a0bc08c460faa1d877163e (patch) | |
tree | b03ded0f9dd58854be1854cb2b2cdf0495c30500 /webkit/gpu | |
parent | 2096a5d5ca18a10adb8d3f848e833a94c31991ac (diff) | |
download | chromium_src-8cdcca3a40bffd4510a0bc08c460faa1d877163e.zip chromium_src-8cdcca3a40bffd4510a0bc08c460faa1d877163e.tar.gz chromium_src-8cdcca3a40bffd4510a0bc08c460faa1d877163e.tar.bz2 |
Make LazyInstance managed Locks leaky.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8430019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108159 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/gpu')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc index d59e7ee..b9a5b00 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc @@ -167,7 +167,7 @@ class GLInProcessContext : public base::SupportsWeakPtr<GLInProcessContext> { CommandBufferService* GetCommandBufferService(); private: - GLInProcessContext(GLInProcessContext* parent); + explicit GLInProcessContext(GLInProcessContext* parent); bool Initialize(bool onscreen, gfx::PluginWindowHandle render_surface, @@ -209,7 +209,8 @@ const int32 kTransferBufferSize = 1024 * 1024; static base::LazyInstance< std::set<WebGraphicsContext3DInProcessCommandBufferImpl*> > g_all_shared_contexts(base::LINKER_INITIALIZED); -static base::LazyInstance<base::Lock> +static base::LazyInstance<base::Lock, + base::LeakyLazyInstanceTraits<base::Lock> > g_all_shared_contexts_lock(base::LINKER_INITIALIZED); // Singleton used to initialize and terminate the gles2 library. @@ -837,8 +838,7 @@ bool WebGraphicsContext3DInProcessCommandBufferImpl::readBackFramebuffer( if (mustRestoreFBO) { gl_->BindFramebuffer(GL_FRAMEBUFFER, framebuffer); } - gl_->ReadPixels(0, 0, width, height, - GL_RGBA, GL_UNSIGNED_BYTE, pixels); + gl_->ReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); // Swizzle red and blue channels // TODO(kbr): expose GL_BGRA as extension @@ -1637,8 +1637,7 @@ void WebGraphicsContext3DInProcessCommandBufferImpl::OnSwapBuffersComplete() { } void WebGraphicsContext3DInProcessCommandBufferImpl::setContextLostCallback( - WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) -{ + WebGraphicsContext3D::WebGraphicsContextLostCallback* cb) { context_lost_callback_ = cb; } |