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

Unified Diff: gpu/ipc/gpu_command_buffer_traits.cc

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 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/ipc/gpu_command_buffer_traits.h ('k') | gpu/ipc/id_type_traits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fdf2e15c6c28ac4c251b6ea69315d4ff002a56d3..be302db6226668939fa718087d47c5bf727e24b8 100644
--- a/gpu/ipc/gpu_command_buffer_traits.cc
+++ b/gpu/ipc/gpu_command_buffer_traits.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
#include "gpu/command_buffer/common/sync_token.h"
#include "gpu/command_buffer/common/value_state.h"
@@ -95,7 +96,7 @@ bool ParamTraits<gpu::SyncToken>::Read(const base::Pickle* m,
bool verified_flush = false;
gpu::CommandBufferNamespace namespace_id =
gpu::CommandBufferNamespace::INVALID;
- uint64_t command_buffer_id = 0;
+ gpu::CommandBufferId command_buffer_id;
uint64_t release_count = 0;
if (!ReadParam(m, iter, &verified_flush) ||
@@ -116,10 +117,9 @@ bool ParamTraits<gpu::SyncToken>::Read(const base::Pickle* 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()),
- static_cast<unsigned long long>(p.command_buffer_id()),
- static_cast<unsigned long long>(p.release_count()));
+ *l += base::StringPrintf(
+ "[%" PRId8 ":%" PRIX64 "] %" PRIu64, p.namespace_id(),
+ p.command_buffer_id().GetUnsafeValue(), p.release_count());
}
void ParamTraits<gpu::Mailbox>::GetSize(base::PickleSizer* s,
« no previous file with comments | « gpu/ipc/gpu_command_buffer_traits.h ('k') | gpu/ipc/id_type_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698