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

Unified Diff: gpu/ipc/common/dx_diag_node_struct_traits.h

Issue 2147693002: Struct traits used by GpuInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: The right public_deps Created 4 years, 4 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 | « gpu/ipc/common/dx_diag_node.typemap ('k') | gpu/ipc/common/dx_diag_node_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/common/dx_diag_node_struct_traits.h
diff --git a/gpu/ipc/common/dx_diag_node_struct_traits.h b/gpu/ipc/common/dx_diag_node_struct_traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..f405240169560a5adb5ed7de7d00cfb524b91f35
--- /dev/null
+++ b/gpu/ipc/common/dx_diag_node_struct_traits.h
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GPU_IPC_COMMON_DX_DIAG_NODE_STRUCT_TRAITS_H_
+#define GPU_IPC_COMMON_DX_DIAG_NODE_STRUCT_TRAITS_H_
+
+#include "gpu/ipc/common/dx_diag_node.mojom.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<gpu::mojom::DxDiagNode, gpu::DxDiagNode> {
+ static bool Read(gpu::mojom::DxDiagNodeDataView data, gpu::DxDiagNode* out);
+
+ static const std::map<std::string, std::string>& values(
+ const gpu::DxDiagNode& node) {
+ return node.values;
+ }
+
+ static const std::map<std::string, gpu::DxDiagNode>& children(
+ const gpu::DxDiagNode& node) {
+ return node.children;
+ }
+};
+
+} // namespace mojo
+
+#endif // GPU_IPC_COMMON_DX_DIAG_NODE_STRUCT_TRAITS_H_
« no previous file with comments | « gpu/ipc/common/dx_diag_node.typemap ('k') | gpu/ipc/common/dx_diag_node_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698