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

Unified Diff: gpu/command_buffer/common/sync_token.h

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/command_buffer/common/id_type_unittest.cc ('k') | gpu/command_buffer/common/sync_token.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/sync_token.h
diff --git a/gpu/command_buffer/common/sync_token.h b/gpu/command_buffer/common/sync_token.h
index 73b232ac3e728f1667b3a6f433106bd276337e5c..655f5e24d6c54e1ab30e63dcdd9ee9c0ae856393 100644
--- a/gpu/command_buffer/common/sync_token.h
+++ b/gpu/command_buffer/common/sync_token.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include <string.h>
+#include "gpu/command_buffer/common/command_buffer_id.h"
#include "gpu/command_buffer/common/constants.h"
#include "gpu/gpu_export.h"
@@ -23,26 +24,16 @@ namespace gpu {
// See src/gpu/GLES2/extensions/CHROMIUM/CHROMIUM_sync_point.txt for more
// details.
struct GPU_EXPORT SyncToken {
- SyncToken()
- : verified_flush_(false),
- namespace_id_(CommandBufferNamespace::INVALID),
- extra_data_field_(0),
- command_buffer_id_(0),
- release_count_(0) {}
+ SyncToken();
SyncToken(CommandBufferNamespace namespace_id,
int32_t extra_data_field,
- uint64_t command_buffer_id,
- uint64_t release_count)
- : verified_flush_(false),
- namespace_id_(namespace_id),
- extra_data_field_(extra_data_field),
- command_buffer_id_(command_buffer_id),
- release_count_(release_count) {}
+ CommandBufferId command_buffer_id,
+ uint64_t release_count);
void Set(CommandBufferNamespace namespace_id,
int32_t extra_data_field,
- uint64_t command_buffer_id,
+ CommandBufferId command_buffer_id,
uint64_t release_count) {
namespace_id_ = namespace_id;
extra_data_field_ = extra_data_field;
@@ -54,7 +45,7 @@ struct GPU_EXPORT SyncToken {
verified_flush_ = false;
namespace_id_ = CommandBufferNamespace::INVALID;
extra_data_field_ = 0;
- command_buffer_id_ = 0;
+ command_buffer_id_ = CommandBufferId();
release_count_ = 0;
}
@@ -74,7 +65,7 @@ struct GPU_EXPORT SyncToken {
bool verified_flush() const { return verified_flush_; }
CommandBufferNamespace namespace_id() const { return namespace_id_; }
- uint64_t command_buffer_id() const { return command_buffer_id_; }
+ CommandBufferId command_buffer_id() const { return command_buffer_id_; }
uint64_t release_count() const { return release_count_; }
// This extra data field can be used by command buffers to add extra
@@ -107,7 +98,7 @@ struct GPU_EXPORT SyncToken {
bool verified_flush_;
CommandBufferNamespace namespace_id_;
int32_t extra_data_field_;
- uint64_t command_buffer_id_;
+ CommandBufferId command_buffer_id_;
uint64_t release_count_;
};
« no previous file with comments | « gpu/command_buffer/common/id_type_unittest.cc ('k') | gpu/command_buffer/common/sync_token.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698