Index: gpu/command_buffer/service/in_process_command_buffer.cc |
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc |
index 6997cecdbf2de82fd668b4f7155050e5790e0727..2b34b2e453f041aedd4be5cb2cda61e25477f9cc 100644 |
--- a/gpu/command_buffer/service/in_process_command_buffer.cc |
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc |
@@ -54,6 +54,8 @@ namespace gpu { |
namespace { |
+base::StaticAtomicSequenceNumber g_next_command_buffer_id; |
+ |
template <typename T> |
static void RunTaskWithResult(base::Callback<T(void)> task, |
T* result, |
@@ -174,7 +176,8 @@ gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() { |
InProcessCommandBuffer::InProcessCommandBuffer( |
const scoped_refptr<Service>& service) |
- : context_lost_(false), |
+ : command_buffer_id_(g_next_command_buffer_id.GetNext()), |
+ context_lost_(false), |
idle_work_pending_(false), |
image_factory_(nullptr), |
last_put_offset_(-1), |
@@ -845,6 +848,14 @@ bool InProcessCommandBuffer::IsGpuChannelLost() { |
return false; |
} |
+CommandBufferNamespace InProcessCommandBuffer::GetNamespaceID() const { |
+ return kCommandBufferNamespace_InProcess; |
+} |
+ |
+uint64_t InProcessCommandBuffer::GetCommandBufferID() const { |
+ return command_buffer_id_; |
+} |
+ |
uint32 InProcessCommandBuffer::CreateStreamTextureOnGpuThread( |
uint32 client_texture_id) { |
#if defined(OS_ANDROID) |