| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ | 5 #ifndef CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ |
| 6 #define CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ | 6 #define CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "cc/ipc/compositor_frame_metadata.mojom.h" | 8 #include "cc/ipc/compositor_frame_metadata.mojom-shared.h" |
| 9 #include "cc/output/compositor_frame_metadata.h" | 9 #include "cc/output/compositor_frame_metadata.h" |
| 10 | 10 |
| 11 namespace mojo { | 11 namespace mojo { |
| 12 | 12 |
| 13 template <> | 13 template <> |
| 14 struct StructTraits<cc::mojom::CompositorFrameMetadataDataView, | 14 struct StructTraits<cc::mojom::CompositorFrameMetadataDataView, |
| 15 cc::CompositorFrameMetadata> { | 15 cc::CompositorFrameMetadata> { |
| 16 static float device_scale_factor( | 16 static float device_scale_factor( |
| 17 const cc::CompositorFrameMetadata& metadata) { | 17 const cc::CompositorFrameMetadata& metadata) { |
| 18 return metadata.device_scale_factor; | 18 return metadata.device_scale_factor; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return metadata.referenced_surfaces; | 111 return metadata.referenced_surfaces; |
| 112 } | 112 } |
| 113 | 113 |
| 114 static bool Read(cc::mojom::CompositorFrameMetadataDataView data, | 114 static bool Read(cc::mojom::CompositorFrameMetadataDataView data, |
| 115 cc::CompositorFrameMetadata* out); | 115 cc::CompositorFrameMetadata* out); |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 } // namespace mojo | 118 } // namespace mojo |
| 119 | 119 |
| 120 #endif // CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ | 120 #endif // CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ |
| OLD | NEW |