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

Unified Diff: cc/ipc/surface_id_struct_traits.h

Issue 2285433002: Use compositor_frame typemap in Blink (Closed)
Patch Set: Adapt to new change after rebase 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.typemap ('k') | cc/ipc/surface_sequence_struct_traits.h » ('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 03ae6156092eb74de2a37d666352c7faa9b41094..0600120979b9f0f056a0d62d720daca7e3f3cb99 100644
--- a/cc/ipc/surface_id_struct_traits.h
+++ b/cc/ipc/surface_id_struct_traits.h
@@ -5,22 +5,20 @@
#ifndef CC_IPC_SURFACE_ID_STRUCT_TRAITS_H_
#define CC_IPC_SURFACE_ID_STRUCT_TRAITS_H_
+#include "cc/ipc/surface_id.mojom-shared.h"
#include "cc/surfaces/surface_id.h"
namespace mojo {
-// This template is fully specialized as cc::mojom::SurfaceIdDataView and
-// as cc::mojom::blink::SurfaceIdDataView, in generated .mojom.h and
-// .mojom-blink.h respectively.
-template <typename T>
-struct StructTraits<T, cc::SurfaceId> {
+template <>
+struct StructTraits<cc::mojom::SurfaceIdDataView, cc::SurfaceId> {
static uint32_t client_id(const cc::SurfaceId& id) { return id.client_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(T data, cc::SurfaceId* out) {
+ static bool Read(cc::mojom::SurfaceIdDataView data, cc::SurfaceId* out) {
*out = cc::SurfaceId(data.client_id(), data.local_id(), data.nonce());
return true;
}
« no previous file with comments | « cc/ipc/surface_id.typemap ('k') | cc/ipc/surface_sequence_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698