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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.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: content/common/gpu/client/command_buffer_proxy_impl.cc
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index 53ce2d7ee543787639fe8e1d0d14af7e50d20764..ed618dc22700f4ea54d82c95ca17eed42d105560 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -27,11 +27,16 @@
namespace content {
+uint64_t CommandBufferProxyID(int channel_id, int32 route_id) {
dcheng 2015/09/17 17:08:18 Nit: wrap this in namespace { }?
David Yen 2015/09/17 17:26:21 Done.
+ return (static_cast<uint64_t>(channel_id) << 32) | route_id;
+}
+
CommandBufferProxyImpl::CommandBufferProxyImpl(GpuChannelHost* channel,
int32 route_id,
int32 stream_id)
: lock_(nullptr),
channel_(channel),
+ command_buffer_id_(CommandBufferProxyID(channel->channel_id(), route_id)),
route_id_(route_id),
stream_id_(stream_id),
flush_count_(0),
@@ -475,6 +480,14 @@ bool CommandBufferProxyImpl::IsGpuChannelLost() {
return !channel_ || channel_->IsLost();
}
+gpu::CommandBufferNamespace CommandBufferProxyImpl::GetNamespaceID() const {
+ return gpu::kCommandBufferNamespace_GpuIO;
+}
+
+uint64_t CommandBufferProxyImpl::GetCommandBufferID() const {
+ return command_buffer_id_;
+}
+
uint32 CommandBufferProxyImpl::InsertSyncPoint() {
CheckLock();
if (last_state_.error != gpu::error::kNoError)

Powered by Google App Engine
This is Rietveld 408576698