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

Unified Diff: ppapi/proxy/ppapi_command_buffer_proxy.cc

Issue 1345813002: Added a unique command buffer ID for command buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NamespaceID and CommandBufferID for CommandBufferLocal Created 5 years, 3 months 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: ppapi/proxy/ppapi_command_buffer_proxy.cc
diff --git a/ppapi/proxy/ppapi_command_buffer_proxy.cc b/ppapi/proxy/ppapi_command_buffer_proxy.cc
index 7a42524bff2fe2827ffbce153f9d62f1a011b108..8893719f3d08ac0f516396df16d1fc470fa4ac7c 100644
--- a/ppapi/proxy/ppapi_command_buffer_proxy.cc
+++ b/ppapi/proxy/ppapi_command_buffer_proxy.cc
@@ -17,8 +17,10 @@ PpapiCommandBufferProxy::PpapiCommandBufferProxy(
const ppapi::HostResource& resource,
PluginDispatcher* dispatcher,
const gpu::Capabilities& capabilities,
- const SerializedHandle& shared_state)
- : capabilities_(capabilities),
+ const SerializedHandle& shared_state,
+ uint64_t command_buffer_id)
+ : command_buffer_id_(command_buffer_id),
+ capabilities_(capabilities),
resource_(resource),
dispatcher_(dispatcher) {
shared_state_shm_.reset(
@@ -177,6 +179,14 @@ bool PpapiCommandBufferProxy::IsGpuChannelLost() {
return false;
}
+gpu::CommandBufferNamespace PpapiCommandBufferProxy::GetNamespaceID() const {
+ return gpu::kCommandBufferNamespace_GpuIO;
+}
+
+uint64_t PpapiCommandBufferProxy::GetCommandBufferID() const {
+ return command_buffer_id_;
+}
+
uint32 PpapiCommandBufferProxy::InsertSyncPoint() {
uint32 sync_point = 0;
if (last_state_.error == gpu::error::kNoError) {

Powered by Google App Engine
This is Rietveld 408576698