| Index: gpu/ipc/common/gpu_info_struct_traits.h
|
| diff --git a/gpu/ipc/common/gpu_info_struct_traits.h b/gpu/ipc/common/gpu_info_struct_traits.h
|
| index ca142166271e96b88dd5ecef0f556047bb4bc5b6..1dedef1e860ee54315a880b2df1a6cab208b7147 100644
|
| --- a/gpu/ipc/common/gpu_info_struct_traits.h
|
| +++ b/gpu/ipc/common/gpu_info_struct_traits.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "gpu/config/gpu_info.h"
|
| #include "gpu/ipc/common/gpu_info.mojom.h"
|
| +#include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
|
|
|
| namespace mojo {
|
|
|
| @@ -47,5 +48,80 @@ struct EnumTraits<gpu::mojom::CollectInfoResult, gpu::CollectInfoResult> {
|
| gpu::CollectInfoResult* out);
|
| };
|
|
|
| +template <>
|
| +struct EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile> {
|
| + static gpu::mojom::VideoCodecProfile ToMojom(
|
| + gpu::VideoCodecProfile video_codec_profile);
|
| + static bool FromMojom(gpu::mojom::VideoCodecProfile input,
|
| + gpu::VideoCodecProfile* out);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<gpu::mojom::VideoDecodeAcceleratorSupportedProfile,
|
| + gpu::VideoDecodeAcceleratorSupportedProfile> {
|
| + static bool Read(
|
| + gpu::mojom::VideoDecodeAcceleratorSupportedProfileDataView data,
|
| + gpu::VideoDecodeAcceleratorSupportedProfile* out);
|
| +
|
| + static gpu::VideoCodecProfile profile(
|
| + const gpu::VideoDecodeAcceleratorSupportedProfile& input) {
|
| + return input.profile;
|
| + }
|
| +
|
| + static const gfx::Size& max_resolution(
|
| + const gpu::VideoDecodeAcceleratorSupportedProfile& input) {
|
| + return input.max_resolution;
|
| + }
|
| +
|
| + static const gfx::Size& min_resolution(
|
| + const gpu::VideoDecodeAcceleratorSupportedProfile& input) {
|
| + return input.min_resolution;
|
| + }
|
| +
|
| + static bool encrypted_only(
|
| + const gpu::VideoDecodeAcceleratorSupportedProfile& input) {
|
| + return input.encrypted_only;
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<gpu::mojom::VideoDecodeAcceleratorCapabilities,
|
| + gpu::VideoDecodeAcceleratorCapabilities> {
|
| + static bool Read(gpu::mojom::VideoDecodeAcceleratorCapabilitiesDataView data,
|
| + gpu::VideoDecodeAcceleratorCapabilities* out);
|
| +
|
| + static uint32_t flags(const gpu::VideoDecodeAcceleratorCapabilities& input) {
|
| + return input.flags;
|
| + }
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<gpu::mojom::VideoEncodeAcceleratorSupportedProfile,
|
| + gpu::VideoEncodeAcceleratorSupportedProfile> {
|
| + static bool Read(
|
| + gpu::mojom::VideoEncodeAcceleratorSupportedProfileDataView data,
|
| + gpu::VideoEncodeAcceleratorSupportedProfile* out);
|
| +
|
| + static gpu::VideoCodecProfile profile(
|
| + const gpu::VideoEncodeAcceleratorSupportedProfile& input) {
|
| + return input.profile;
|
| + }
|
| +
|
| + static const gfx::Size& max_resolution(
|
| + const gpu::VideoEncodeAcceleratorSupportedProfile& input) {
|
| + return input.max_resolution;
|
| + }
|
| +
|
| + static uint32_t max_framerate_numerator(
|
| + const gpu::VideoEncodeAcceleratorSupportedProfile& input) {
|
| + return input.max_framerate_numerator;
|
| + }
|
| +
|
| + static uint32_t max_framerate_denominator(
|
| + const gpu::VideoEncodeAcceleratorSupportedProfile& input) {
|
| + return input.max_framerate_denominator;
|
| + }
|
| +};
|
| +
|
| } // namespace mojo
|
| #endif // CC_IPC_GPU_STRUCT_TRAITS_H_
|
|
|