| Index: cc/surfaces/surface_id.h
|
| diff --git a/cc/surfaces/surface_id.h b/cc/surfaces/surface_id.h
|
| index c0c4410d973f1512ce0268e5d0dd30429dc22edd..d257d02322de41bb7ffeb93ec09b2566daaac455 100644
|
| --- a/cc/surfaces/surface_id.h
|
| +++ b/cc/surfaces/surface_id.h
|
| @@ -5,39 +5,12 @@
|
| #ifndef CC_SURFACES_SURFACE_ID_H_
|
| #define CC_SURFACES_SURFACE_ID_H_
|
|
|
| -#include <stddef.h>
|
| -#include <stdint.h>
|
| -
|
| -#include <functional>
|
| +#include "base/id_type.h"
|
|
|
| namespace cc {
|
|
|
| -struct SurfaceId {
|
| - SurfaceId() : id(0) {}
|
| - explicit SurfaceId(uint64_t id) : id(id) {}
|
| -
|
| - bool is_null() const { return id == 0; }
|
| -
|
| - uint64_t id;
|
| -};
|
| -
|
| -inline bool operator==(const SurfaceId& a, const SurfaceId& b) {
|
| - return a.id == b.id;
|
| -}
|
| -
|
| -inline bool operator!=(const SurfaceId& a, const SurfaceId& b) {
|
| - return !(a == b);
|
| -}
|
| -
|
| -inline bool operator<(const SurfaceId& a, const SurfaceId& b) {
|
| - return a.id < b.id;
|
| -}
|
| -
|
| -struct SurfaceIdHash {
|
| - size_t operator()(const SurfaceId& key) const {
|
| - return std::hash<uint64_t>()(key.id);
|
| - }
|
| -};
|
| +class Surface;
|
| +using SurfaceId = base::IdTypeU64<Surface>;
|
|
|
| } // namespace cc
|
|
|
|
|