Index: cc/surfaces/surface_sequence.h |
diff --git a/cc/surfaces/surface_sequence.h b/cc/surfaces/surface_sequence.h |
index fa0a8c8e5f8fe3926a4b28ac30ca5e5d5eba2d4a..a8fcc58cec66532f53cbe2fbc9a68a7a057f5bdc 100644 |
--- a/cc/surfaces/surface_sequence.h |
+++ b/cc/surfaces/surface_sequence.h |
@@ -11,6 +11,7 @@ |
#include <tuple> |
#include "base/hash.h" |
+#include "cc/surfaces/frame_sink_id.h" |
namespace cc { |
@@ -18,17 +19,17 @@ namespace cc { |
// dependencies between frames. A sequence number may be satisfied once, and |
// may be depended on once. |
struct SurfaceSequence { |
- SurfaceSequence() : client_id(0u), sequence(0u) {} |
- SurfaceSequence(uint32_t client_id, uint32_t sequence) |
- : client_id(client_id), sequence(sequence) {} |
- bool is_null() const { return client_id == 0u && sequence == 0u; } |
+ SurfaceSequence() : sequence(0u) {} |
+ SurfaceSequence(const FrameSinkId& frame_sink_id, uint32_t sequence) |
+ : frame_sink_id(frame_sink_id), sequence(sequence) {} |
+ bool is_null() const { return frame_sink_id.is_null() && sequence == 0u; } |
- uint32_t client_id; |
+ FrameSinkId frame_sink_id; |
uint32_t sequence; |
}; |
inline bool operator==(const SurfaceSequence& a, const SurfaceSequence& b) { |
- return a.client_id == b.client_id && a.sequence == b.sequence; |
+ return a.frame_sink_id == b.frame_sink_id && a.sequence == b.sequence; |
} |
inline bool operator!=(const SurfaceSequence& a, const SurfaceSequence& b) { |
@@ -36,12 +37,13 @@ inline bool operator!=(const SurfaceSequence& a, const SurfaceSequence& b) { |
} |
inline bool operator<(const SurfaceSequence& a, const SurfaceSequence& b) { |
- return std::tie(a.client_id, a.sequence) < std::tie(b.client_id, b.sequence); |
+ return std::tie(a.frame_sink_id, a.sequence) < |
+ std::tie(b.frame_sink_id, b.sequence); |
} |
struct SurfaceSequenceHash { |
size_t operator()(SurfaceSequence key) const { |
- return base::HashInts(key.client_id, key.sequence); |
+ return base::HashInts(key.frame_sink_id.hash(), key.sequence); |
} |
}; |