| Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| index 708a3da8ee0a8b2c93894de7eef23006bd2fa062..8ae7b266ec9a527b10ea00e8b413dcaf49690a40 100644
|
| --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| @@ -120,7 +120,9 @@ WebGraphicsContext3DCommandBufferImpl::WebGraphicsContext3DCommandBufferImpl(
|
| WebGraphicsContext3DCommandBufferImpl::
|
| ~WebGraphicsContext3DCommandBufferImpl() {
|
| if (real_gl_) {
|
| - real_gl_->SetErrorMessageCallback(NULL);
|
| + real_gl_->SetErrorMessageCallback(
|
| + base::Callback<void(const char*, int32_t)>());
|
| + real_gl_->SetLostContextCallback(base::Closure());
|
| }
|
|
|
| Destroy();
|
| @@ -147,15 +149,16 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL() {
|
| return false;
|
| }
|
|
|
| - command_buffer_->SetContextLostCallback(
|
| - base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnContextLost,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| -
|
| - command_buffer_->SetOnConsoleMessageCallback(
|
| + real_gl_->SetErrorMessageCallback(
|
| + // This method is in WebGraphicsContext3DImpl.
|
| base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnErrorMessage,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| + // The callback is unset in the destructor.
|
| + base::Unretained(this)));
|
| + real_gl_->SetLostContextCallback(
|
| + base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnContextLost,
|
| + // The callback is unset in the destructor.
|
| + base::Unretained(this)));
|
|
|
| - real_gl_->SetErrorMessageCallback(getErrorMessageCallback());
|
| real_gl_->TraceBeginCHROMIUM("WebGraphicsContext3D",
|
| "CommandBufferContext");
|
|
|
|
|