| 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_GPU_STRUCT_TRAITS_H_ | 5 #ifndef CC_IPC_GPU_STRUCT_TRAITS_H_ |
| 6 #define CC_IPC_GPU_STRUCT_TRAITS_H_ | 6 #define CC_IPC_GPU_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "gpu/config/gpu_info.h" | 9 #include "gpu/config/gpu_info.h" |
| 10 #include "gpu/ipc/common/dx_diag_node_struct_traits.h" | 10 #include "gpu/ipc/common/dx_diag_node_struct_traits.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 template <> | 90 template <> |
| 91 struct StructTraits<gpu::mojom::VideoDecodeAcceleratorCapabilitiesDataView, | 91 struct StructTraits<gpu::mojom::VideoDecodeAcceleratorCapabilitiesDataView, |
| 92 gpu::VideoDecodeAcceleratorCapabilities> { | 92 gpu::VideoDecodeAcceleratorCapabilities> { |
| 93 static bool Read(gpu::mojom::VideoDecodeAcceleratorCapabilitiesDataView data, | 93 static bool Read(gpu::mojom::VideoDecodeAcceleratorCapabilitiesDataView data, |
| 94 gpu::VideoDecodeAcceleratorCapabilities* out); | 94 gpu::VideoDecodeAcceleratorCapabilities* out); |
| 95 | 95 |
| 96 static uint32_t flags(const gpu::VideoDecodeAcceleratorCapabilities& input) { | 96 static uint32_t flags(const gpu::VideoDecodeAcceleratorCapabilities& input) { |
| 97 return input.flags; | 97 return input.flags; |
| 98 } | 98 } |
| 99 |
| 100 static std::vector<gpu::VideoDecodeAcceleratorSupportedProfile> |
| 101 supported_profiles(const gpu::VideoDecodeAcceleratorCapabilities& input) { |
| 102 return input.supported_profiles; |
| 103 } |
| 99 }; | 104 }; |
| 100 | 105 |
| 101 template <> | 106 template <> |
| 102 struct StructTraits<gpu::mojom::VideoEncodeAcceleratorSupportedProfileDataView, | 107 struct StructTraits<gpu::mojom::VideoEncodeAcceleratorSupportedProfileDataView, |
| 103 gpu::VideoEncodeAcceleratorSupportedProfile> { | 108 gpu::VideoEncodeAcceleratorSupportedProfile> { |
| 104 static bool Read( | 109 static bool Read( |
| 105 gpu::mojom::VideoEncodeAcceleratorSupportedProfileDataView data, | 110 gpu::mojom::VideoEncodeAcceleratorSupportedProfileDataView data, |
| 106 gpu::VideoEncodeAcceleratorSupportedProfile* out); | 111 gpu::VideoEncodeAcceleratorSupportedProfile* out); |
| 107 | 112 |
| 108 static gpu::VideoCodecProfile profile( | 113 static gpu::VideoCodecProfile profile( |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 static uint64_t rgba_visual(const gpu::GPUInfo& input) { | 304 static uint64_t rgba_visual(const gpu::GPUInfo& input) { |
| 300 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 305 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 301 return input.rgba_visual; | 306 return input.rgba_visual; |
| 302 #endif | 307 #endif |
| 303 return 0; | 308 return 0; |
| 304 } | 309 } |
| 305 }; | 310 }; |
| 306 | 311 |
| 307 } // namespace mojo | 312 } // namespace mojo |
| 308 #endif // CC_IPC_GPU_STRUCT_TRAITS_H_ | 313 #endif // CC_IPC_GPU_STRUCT_TRAITS_H_ |
| OLD | NEW |