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

Unified Diff: gpu/ipc/gpu_command_buffer_traits.cc

Issue 1489573003: Added an extra sync token field for extra command buffer identification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: gpu/ipc/gpu_command_buffer_traits.cc
diff --git a/gpu/ipc/gpu_command_buffer_traits.cc b/gpu/ipc/gpu_command_buffer_traits.cc
index a1932eede1b2da38e83a031047c77c801409d6ff..72a342413c72cf410798dcfd8e30660379651d77 100644
--- a/gpu/ipc/gpu_command_buffer_traits.cc
+++ b/gpu/ipc/gpu_command_buffer_traits.cc
@@ -59,6 +59,7 @@ void ParamTraits<gpu::SyncToken>::Write(Message* m, const param_type& p) {
WriteParam(m, p.verified_flush());
WriteParam(m, p.namespace_id());
+ WriteParam(m, p.extra_data_field());
WriteParam(m, p.command_buffer_id());
WriteParam(m, p.release_count());
}
@@ -69,17 +70,19 @@ bool ParamTraits<gpu::SyncToken>::Read(const Message* m,
bool verified_flush = false;
gpu::CommandBufferNamespace namespace_id =
gpu::CommandBufferNamespace::INVALID;
+ uint32_t extra_data_field = 0;
uint64_t command_buffer_id = 0;
uint64_t release_count = 0;
if (!ReadParam(m, iter, &verified_flush) ||
!ReadParam(m, iter, &namespace_id) ||
+ !ReadParam(m, iter, &extra_data_field) ||
piman 2015/11/30 20:59:23 Actually, I have a security concern: the rest of t
David Yen 2015/11/30 22:45:06 Since I have created this variable as a "generic s
!ReadParam(m, iter, &command_buffer_id) ||
!ReadParam(m, iter, &release_count)) {
return false;
}
- p->Set(namespace_id, command_buffer_id, release_count);
+ p->Set(namespace_id, extra_data_field, command_buffer_id, release_count);
if (p->HasData()) {
if (!verified_flush)
return false;
@@ -91,8 +94,10 @@ bool ParamTraits<gpu::SyncToken>::Read(const Message* m,
void ParamTraits<gpu::SyncToken>::Log(const param_type& p, std::string* l) {
*l +=
- base::StringPrintf("[%d:%llX] %llu", static_cast<int>(p.namespace_id()),
+ base::StringPrintf("[%d:%llX:%u] %llu",
+ static_cast<int>(p.namespace_id()),
static_cast<unsigned long long>(p.command_buffer_id()),
+ p.extra_data_field(),
static_cast<unsigned long long>(p.release_count()));
}

Powered by Google App Engine
This is Rietveld 408576698