| 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 c6990b26e3f3bc16b2e4907a94489ac4e7c7f0ae..a4445e63d38dcd18c43e4ab78e69c5c20b19a71f 100644
|
| --- a/mojo/gles2/command_buffer_client_impl.cc
|
| +++ b/mojo/gles2/command_buffer_client_impl.cc
|
| @@ -53,7 +53,9 @@ class CommandBufferClientImpl::SyncClientImpl
|
| public:
|
| SyncClientImpl(mus::mojom::CommandBufferSyncClientPtr* ptr,
|
| const MojoAsyncWaiter* async_waiter)
|
| - : initialized_successfully_(false), binding_(this, ptr, async_waiter) {}
|
| + : initialized_successfully_(false),
|
| + command_buffer_id_(0),
|
| + binding_(this, ptr, async_waiter) {}
|
|
|
| bool WaitForInitialization() {
|
| if (!binding_.WaitForIncomingMethodCall())
|
| @@ -73,11 +75,19 @@ class CommandBufferClientImpl::SyncClientImpl
|
| return gpu::Capabilities();
|
| }
|
|
|
| + uint64_t GetCommandBufferID() const {
|
| + return command_buffer_id_;
|
| + }
|
| +
|
| private:
|
| // CommandBufferSyncClient methods:
|
| void DidInitialize(bool success,
|
| + int32_t command_buffer_namespace,
|
| + uint64_t command_buffer_id,
|
| mus::mojom::GpuCapabilitiesPtr capabilities) override {
|
| + CHECK_EQ(command_buffer_namespace, gpu::CommandBufferNamespace::MOJO);
|
| initialized_successfully_ = success;
|
| + command_buffer_id_ = command_buffer_id;
|
| capabilities_ = capabilities.Pass();
|
| }
|
| void DidMakeProgress(mus::mojom::CommandBufferStatePtr state) override {
|
| @@ -85,6 +95,7 @@ class CommandBufferClientImpl::SyncClientImpl
|
| }
|
|
|
| bool initialized_successfully_;
|
| + uint64_t command_buffer_id_;
|
| mus::mojom::GpuCapabilitiesPtr capabilities_;
|
| mus::mojom::CommandBufferStatePtr command_buffer_state_;
|
| mojo::Binding<mus::mojom::CommandBufferSyncClient> binding_;
|
| @@ -403,11 +414,7 @@ gpu::CommandBufferNamespace CommandBufferClientImpl::GetNamespaceID() const {
|
| }
|
|
|
| uint64_t CommandBufferClientImpl::GetCommandBufferID() const {
|
| - // TODO (rjkroege): This must correspond to the command buffer ID on the
|
| - // server side. Most likely a combination of the client-specific integer and
|
| - // the connect id.
|
| - NOTIMPLEMENTED();
|
| - return 0;
|
| + return sync_client_impl_->GetCommandBufferID();
|
| }
|
|
|
| uint64_t CommandBufferClientImpl::GenerateFenceSyncRelease() {
|
|
|