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

Unified Diff: cc/surfaces/surface_sequence.h

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 years, 3 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 | « cc/surfaces/surface_manager.cc ('k') | cc/surfaces/surface_sequence_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
};
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | cc/surfaces/surface_sequence_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698