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

Unified Diff: cc/ipc/surface_id_struct_traits.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/ipc/surface_id.mojom ('k') | cc/ipc/surface_sequence.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/surface_id_struct_traits.h
diff --git a/cc/ipc/surface_id_struct_traits.h b/cc/ipc/surface_id_struct_traits.h
index 0600120979b9f0f056a0d62d720daca7e3f3cb99..d8be65f4e1c218245fbb12985dff15ac5a2faf60 100644
--- a/cc/ipc/surface_id_struct_traits.h
+++ b/cc/ipc/surface_id_struct_traits.h
@@ -5,21 +5,28 @@
#ifndef CC_IPC_SURFACE_ID_STRUCT_TRAITS_H_
#define CC_IPC_SURFACE_ID_STRUCT_TRAITS_H_
+#include "cc/ipc/frame_sink_id_struct_traits.h"
#include "cc/ipc/surface_id.mojom-shared.h"
+#include "cc/surfaces/frame_sink_id.h"
#include "cc/surfaces/surface_id.h"
namespace mojo {
template <>
struct StructTraits<cc::mojom::SurfaceIdDataView, cc::SurfaceId> {
- static uint32_t client_id(const cc::SurfaceId& id) { return id.client_id(); }
+ static const cc::FrameSinkId& frame_sink_id(const cc::SurfaceId& id) {
+ return id.frame_sink_id();
+ }
static uint32_t local_id(const cc::SurfaceId& id) { return id.local_id(); }
static uint64_t nonce(const cc::SurfaceId& id) { return id.nonce(); }
static bool Read(cc::mojom::SurfaceIdDataView data, cc::SurfaceId* out) {
- *out = cc::SurfaceId(data.client_id(), data.local_id(), data.nonce());
+ cc::FrameSinkId frame_sink_id;
+ if (!data.ReadFrameSinkId(&frame_sink_id))
+ return false;
+ *out = cc::SurfaceId(frame_sink_id, data.local_id(), data.nonce());
return true;
}
};
« no previous file with comments | « cc/ipc/surface_id.mojom ('k') | cc/ipc/surface_sequence.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698