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

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.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: Fix bad merge 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
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/tests/gl_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 615071e9ef5cea9a00a8408206c98fbf3738e6c9..01ac9711b1428bb1ed9433b9776efe88d2fd079a 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),
delayed_work_pending_(false),
image_factory_(nullptr),
last_put_offset_(-1),
@@ -849,6 +852,14 @@ bool InProcessCommandBuffer::IsGpuChannelLost() {
return false;
}
+CommandBufferNamespace InProcessCommandBuffer::GetNamespaceID() const {
+ return CommandBufferNamespace::IN_PROCESS;
+}
+
+uint64_t InProcessCommandBuffer::GetCommandBufferID() const {
+ return command_buffer_id_;
+}
+
uint32 InProcessCommandBuffer::CreateStreamTextureOnGpuThread(
uint32 client_texture_id) {
#if defined(OS_ANDROID)
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.h ('k') | gpu/command_buffer/tests/gl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698