Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: mojo/gles2/command_buffer_client_impl.cc

Issue 1460833002: gpu: Implement the new fence syncs in mojo command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address issues Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {
« components/mus/gles2/command_buffer_local.cc ('K') | « gpu/command_buffer/common/constants.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698