| 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 29dc0e2384d4e29b776072eac60e2d8bfc7b208d..708a3da8ee0a8b2c93894de7eef23006bd2fa062 100644
|
| --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
| @@ -120,9 +120,7 @@
|
| WebGraphicsContext3DCommandBufferImpl::
|
| ~WebGraphicsContext3DCommandBufferImpl() {
|
| if (real_gl_) {
|
| - real_gl_->SetErrorMessageCallback(
|
| - base::Callback<void(const char*, int32_t)>());
|
| - real_gl_->SetLostContextCallback(base::Closure());
|
| + real_gl_->SetErrorMessageCallback(NULL);
|
| }
|
|
|
| Destroy();
|
| @@ -149,15 +147,15 @@
|
| return false;
|
| }
|
|
|
| - real_gl_->SetErrorMessageCallback(
|
| + command_buffer_->SetContextLostCallback(
|
| + base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnContextLost,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| +
|
| + command_buffer_->SetOnConsoleMessageCallback(
|
| base::Bind(&WebGraphicsContext3DCommandBufferImpl::OnErrorMessage,
|
| - // 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)));
|
| -
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| +
|
| + real_gl_->SetErrorMessageCallback(getErrorMessageCallback());
|
| real_gl_->TraceBeginCHROMIUM("WebGraphicsContext3D",
|
| "CommandBufferContext");
|
|
|
| @@ -364,12 +362,4 @@
|
| UmaRecordContextLost(context_type_, state.error, state.context_lost_reason);
|
| }
|
|
|
| -void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(const char* message,
|
| - int id) {
|
| - if (error_message_callback_) {
|
| - blink::WebString str = blink::WebString::fromUTF8(message);
|
| - error_message_callback_->onErrorMessage(str, id);
|
| - }
|
| -}
|
| -
|
| } // namespace content
|
|
|