Index: mojo/gles2/command_buffer_client_impl.cc |
diff --git a/mojo/gles2/command_buffer_client_impl.cc b/mojo/gles2/command_buffer_client_impl.cc |
index e32a2146cccd3469697c312ebd68360ff2e4256e..14f0569ce1495c1f9ae994a8fdec6660abf305d6 100644 |
--- a/mojo/gles2/command_buffer_client_impl.cc |
+++ b/mojo/gles2/command_buffer_client_impl.cc |
@@ -16,7 +16,6 @@ |
#include "components/mus/gles2/command_buffer_type_conversions.h" |
#include "components/mus/gles2/mojo_buffer_backing.h" |
#include "components/mus/gles2/mojo_gpu_memory_buffer.h" |
-#include "gpu/command_buffer/client/gpu_control_client.h" |
#include "gpu/command_buffer/common/command_buffer_id.h" |
#include "gpu/command_buffer/common/gpu_memory_buffer_support.h" |
#include "gpu/command_buffer/common/sync_token.h" |
@@ -62,11 +61,15 @@ |
} // namespace |
+CommandBufferDelegate::~CommandBufferDelegate() {} |
+ |
+void CommandBufferDelegate::ContextLost() {} |
+ |
CommandBufferClientImpl::CommandBufferClientImpl( |
+ CommandBufferDelegate* delegate, |
const std::vector<int32_t>& attribs, |
mojo::ScopedMessagePipeHandle command_buffer_handle) |
- : gpu_control_client_(nullptr), |
- destroyed_(false), |
+ : delegate_(delegate), |
attribs_(attribs), |
client_binding_(this), |
command_buffer_id_(), |
@@ -200,10 +203,6 @@ |
command_buffer_->DestroyTransferBuffer(id); |
} |
-void CommandBufferClientImpl::SetGpuControlClient(gpu::GpuControlClient* c) { |
- gpu_control_client_ = c; |
-} |
- |
gpu::Capabilities CommandBufferClientImpl::GetCapabilities() { |
return capabilities_; |
} |
@@ -286,14 +285,10 @@ |
} |
void CommandBufferClientImpl::Destroyed(int32_t lost_reason, int32_t error) { |
- if (destroyed_) |
- return; |
last_state_.context_lost_reason = |
static_cast<gpu::error::ContextLostReason>(lost_reason); |
last_state_.error = static_cast<gpu::error::Error>(error); |
- if (gpu_control_client_) |
- gpu_control_client_->OnGpuControlLostContext(); |
- destroyed_ = true; |
+ delegate_->ContextLost(); |
} |
void CommandBufferClientImpl::SignalAck(uint32_t id) { |