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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.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 | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/renderer/pepper/ppb_graphics_3d_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index dc89d3ba88fe60cd64f3630eeb60fcd1c1f24d48..50836c8c7848e036c02b728beab5a4719f9a1cb4 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -161,6 +161,10 @@ void RunOnThread(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
}
}
+uint64_t GetCommandBufferID(int channel_id, int32 route_id) {
+ return (static_cast<uint64_t>(channel_id) << 32) | route_id;
+}
+
} // namespace
GpuCommandBufferStub::GpuCommandBufferStub(
@@ -191,6 +195,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(
requested_attribs_(attribs),
gpu_preference_(gpu_preference),
use_virtualized_gl_context_(use_virtualized_gl_context),
+ command_buffer_id_(GetCommandBufferID(channel->client_id(), route_id)),
stream_id_(stream_id),
route_id_(route_id),
surface_id_(surface_id),
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/renderer/pepper/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698