Chromium Code Reviews| 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..4ce9a7f4b79068b6c64bf880f7e0489f1463befd 100644 |
| --- a/content/common/gpu/client/command_buffer_proxy_impl.cc |
| +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc |
| @@ -27,11 +27,20 @@ |
| namespace content { |
| +namespace { |
| + |
| +uint64_t CommandBufferProxyID(int channel_id, int32 route_id) { |
| + return (static_cast<uint64_t>(channel_id) << 32) | route_id; |
| +} |
| + |
| +} // anonymous namespace |
|
dcheng
2015/09/17 21:41:30
Nit: usually people just comment this as "// name
David Yen
2015/09/17 21:45:20
Done.
|
| + |
| 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 +484,14 @@ bool CommandBufferProxyImpl::IsGpuChannelLost() { |
| return !channel_ || channel_->IsLost(); |
| } |
| +gpu::CommandBufferNamespace CommandBufferProxyImpl::GetNamespaceID() const { |
| + return gpu::CommandBufferNamespace::GPU_IO; |
| +} |
| + |
| +uint64_t CommandBufferProxyImpl::GetCommandBufferID() const { |
| + return command_buffer_id_; |
| +} |
| + |
| uint32 CommandBufferProxyImpl::InsertSyncPoint() { |
| CheckLock(); |
| if (last_state_.error != gpu::error::kNoError) |