Index: components/mus/gles2/command_buffer_impl.cc |
diff --git a/components/mus/gles2/command_buffer_impl.cc b/components/mus/gles2/command_buffer_impl.cc |
index c00a86ee7db725b9a4e4cc6dade3582f340da596..0c69eea34bb8b99b26be101e55d7222cc3270f4f 100644 |
--- a/components/mus/gles2/command_buffer_impl.cc |
+++ b/components/mus/gles2/command_buffer_impl.cc |
@@ -8,7 +8,6 @@ |
#include "base/macros.h" |
#include "base/message_loop/message_loop.h" |
#include "components/mus/gles2/command_buffer_driver.h" |
-#include "components/mus/gles2/command_buffer_impl_observer.h" |
#include "components/mus/gles2/command_buffer_type_conversions.h" |
#include "components/mus/gles2/gpu_state.h" |
#include "gpu/command_buffer/service/sync_point_manager.h" |
@@ -53,7 +52,7 @@ class CommandBufferImpl::CommandBufferDriverClientImpl |
CommandBufferImpl::CommandBufferImpl( |
mojo::InterfaceRequest<mus::mojom::CommandBuffer> request, |
scoped_refptr<GpuState> gpu_state) |
- : gpu_state_(gpu_state), observer_(nullptr) { |
+ : gpu_state_(gpu_state) { |
// Bind |CommandBufferImpl| to the |request| in the GPU control thread. |
gpu_state_->control_task_runner()->PostTask( |
FROM_HERE, |
@@ -63,23 +62,21 @@ CommandBufferImpl::CommandBufferImpl( |
void CommandBufferImpl::DidLoseContext(uint32_t reason) { |
driver_->set_client(nullptr); |
- loss_observer_->DidLoseContext(reason); |
+ client_->Destroyed(reason, gpu::error::kLostContext); |
} |
CommandBufferImpl::~CommandBufferImpl() { |
- if (observer_) |
- observer_->OnCommandBufferImplDestroyed(); |
} |
void CommandBufferImpl::Initialize( |
- mus::mojom::CommandBufferLostContextObserverPtr loss_observer, |
+ mus::mojom::CommandBufferClientPtr client, |
mojo::ScopedSharedBufferHandle shared_state, |
mojo::Array<int32_t> attribs, |
const mojom::CommandBuffer::InitializeCallback& callback) { |
gpu_state_->command_buffer_task_runner()->task_runner()->PostTask( |
FROM_HERE, |
base::Bind(&CommandBufferImpl::InitializeOnGpuThread, |
- base::Unretained(this), base::Passed(&loss_observer), |
+ base::Unretained(this), base::Passed(&client), |
base::Passed(&shared_state), base::Passed(&attribs), |
base::Bind(&RunInitializeCallback, callback))); |
} |
@@ -146,6 +143,37 @@ void CommandBufferImpl::DestroyImage(int32_t id) { |
base::Unretained(this), id)); |
} |
+void CommandBufferImpl::CreateStreamTexture( |
+ uint32_t client_texture_id, |
+ const mojom::CommandBuffer::CreateStreamTextureCallback& callback) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void CommandBufferImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void CommandBufferImpl::SignalQuery(uint32_t query, uint32_t signal_id) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void CommandBufferImpl::SignalSyncToken(const gpu::SyncToken& sync_token, |
+ uint32_t signal_id) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void CommandBufferImpl::WaitForGetOffsetInRange( |
+ int32_t start, int32_t end, |
+ const mojom::CommandBuffer::WaitForGetOffsetInRangeCallback& callback) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void CommandBufferImpl::WaitForTokenInRange( |
+ int32_t start, int32_t end, |
+ const mojom::CommandBuffer::WaitForGetOffsetInRangeCallback& callback) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
void CommandBufferImpl::BindToRequest( |
mojo::InterfaceRequest<mus::mojom::CommandBuffer> request) { |
binding_.reset( |
@@ -154,7 +182,7 @@ void CommandBufferImpl::BindToRequest( |
} |
void CommandBufferImpl::InitializeOnGpuThread( |
- mojom::CommandBufferLostContextObserverPtr loss_observer, |
+ mojom::CommandBufferClientPtr client, |
mojo::ScopedSharedBufferHandle shared_state, |
mojo::Array<int32_t> attribs, |
const base::Callback< |
@@ -164,7 +192,7 @@ void CommandBufferImpl::InitializeOnGpuThread( |
gpu::CommandBufferNamespace::MOJO, ++g_next_command_buffer_id, |
gfx::kNullAcceleratedWidget, gpu_state_)); |
driver_->set_client(make_scoped_ptr(new CommandBufferDriverClientImpl(this))); |
- loss_observer_ = mojo::MakeProxy(loss_observer.PassInterface()); |
+ client_ = mojo::MakeProxy(client.PassInterface()); |
bool result = |
driver_->Initialize(std::move(shared_state), std::move(attribs)); |
mojom::CommandBufferInitializeResultPtr initialize_result; |