Index: cc/surfaces/surface_id.h |
diff --git a/cc/surfaces/surface_id.h b/cc/surfaces/surface_id.h |
index c48e8129192ddc8b98287a5e846c157bc910f396..48a434affe1309ba155534537d63b381d938bff8 100644 |
--- a/cc/surfaces/surface_id.h |
+++ b/cc/surfaces/surface_id.h |
@@ -18,58 +18,57 @@ namespace cc { |
class SurfaceId { |
public: |
- SurfaceId() : id_namespace_(0), local_id_(0), nonce_(0) {} |
+ SurfaceId() : client_id_(0), local_id_(0), nonce_(0) {} |
SurfaceId(const SurfaceId& other) |
- : id_namespace_(other.id_namespace_), |
+ : client_id_(other.client_id_), |
local_id_(other.local_id_), |
nonce_(other.nonce_) {} |
- // A SurfaceId consists of three components: namespace, local Id, and nonce. |
- // An |id_namespace| is a display compositor service allocated ID that |
+ // A SurfaceId consists of three components: client Id, local Id, and nonce. |
+ // A |client_id| is a display compositor service allocated ID that |
// uniquely identifies a client. |
// A |local_id| is a sequentially allocated ID generated by the display |
- // compositor client. |
+ // compositor client that uniquely identifies a surface. |
// A |nonce| is a cryptographically secure random int that makes a SurfaceId |
// unguessable by other clients. |
- SurfaceId(uint32_t id_namespace, uint32_t local_id, uint64_t nonce) |
- : id_namespace_(id_namespace), local_id_(local_id), nonce_(nonce) {} |
+ SurfaceId(uint32_t client_id, uint32_t local_id, uint64_t nonce) |
+ : client_id_(client_id), local_id_(local_id), nonce_(nonce) {} |
bool is_null() const { |
- return id_namespace_ == 0 && nonce_ == 0 && local_id_ == 0; |
+ return client_id_ == 0 && nonce_ == 0 && local_id_ == 0; |
} |
size_t hash() const { |
- size_t interim = base::HashInts(id_namespace_, local_id_); |
+ size_t interim = base::HashInts(client_id_, local_id_); |
return base::HashInts(static_cast<uint64_t>(interim), nonce_); |
} |
- uint32_t id_namespace() const { return id_namespace_; } |
+ uint32_t client_id() const { return client_id_; } |
uint32_t local_id() const { return local_id_; } |
uint64_t nonce() const { return nonce_; } |
std::string ToString() const { |
- return base::StringPrintf("%d:%d:%" PRIu64, id_namespace_, local_id_, |
- nonce_); |
+ return base::StringPrintf("%d:%d:%" PRIu64, client_id_, local_id_, nonce_); |
} |
bool operator==(const SurfaceId& other) const { |
- return id_namespace_ == other.id_namespace_ && |
- local_id_ == other.local_id_ && nonce_ == other.nonce_; |
+ return client_id_ == other.client_id_ && local_id_ == other.local_id_ && |
+ nonce_ == other.nonce_; |
} |
bool operator!=(const SurfaceId& other) const { return !(*this == other); } |
bool operator<(const SurfaceId& other) const { |
- return std::tie(id_namespace_, local_id_, nonce_) < |
- std::tie(other.id_namespace_, other.local_id_, other.nonce_); |
+ return std::tie(client_id_, local_id_, nonce_) < |
+ std::tie(other.client_id_, other.local_id_, other.nonce_); |
} |
private: |
// See SurfaceIdAllocator::GenerateId. |
- uint32_t id_namespace_; |
+ uint32_t client_id_; |
uint32_t local_id_; |
uint64_t nonce_; |
}; |