Index: gpu/ipc/common/gpu_info_struct_traits.cc |
diff --git a/gpu/ipc/common/gpu_info_struct_traits.cc b/gpu/ipc/common/gpu_info_struct_traits.cc |
index 6bcea5ce9ea1324912c68afa199eb52964e06e1d..8873250daaa7201c8e7ea09a5fa614767842c634 100644 |
--- a/gpu/ipc/common/gpu_info_struct_traits.cc |
+++ b/gpu/ipc/common/gpu_info_struct_traits.cc |
@@ -57,4 +57,41 @@ bool EnumTraits<gpu::mojom::CollectInfoResult, gpu::CollectInfoResult>:: |
return false; |
} |
+// static |
+gpu::mojom::VideoCodecProfile |
+EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::ToMojom( |
+ gpu::VideoCodecProfile video_codec_profile) { |
+ return static_cast<gpu::mojom::VideoCodecProfile>(video_codec_profile); |
Fady Samuel
2016/07/15 18:08:38
Use switch statement.
Alex Z.
2016/07/18 12:50:05
Done.
|
+} |
+ |
+// static |
+bool EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>:: |
+ FromMojom(gpu::mojom::VideoCodecProfile input, |
+ gpu::VideoCodecProfile* out) { |
+ *out = static_cast<gpu::VideoCodecProfile>(input); |
Fady Samuel
2016/07/15 18:08:38
use switch statement.
Alex Z.
2016/07/18 12:50:05
Done.
|
+ return true; |
+} |
+ |
+// static |
+bool StructTraits<gpu::mojom::VideoDecodeAcceleratorSupportedProfile, |
+ gpu::VideoDecodeAcceleratorSupportedProfile>:: |
+ Read(gpu::mojom::VideoDecodeAcceleratorSupportedProfileDataView data, |
+ gpu::VideoDecodeAcceleratorSupportedProfile* out) { |
+ out->encrypted_only = data.encrypted_only(); |
+ return data.ReadProfile(&out->profile) && |
+ data.ReadMaxResolution(&out->max_resolution) && |
+ data.ReadMinResolution(&out->min_resolution); |
+} |
+ |
+// static |
+bool StructTraits<gpu::mojom::VideoEncodeAcceleratorSupportedProfile, |
+ gpu::VideoEncodeAcceleratorSupportedProfile>:: |
+ Read(gpu::mojom::VideoEncodeAcceleratorSupportedProfileDataView data, |
+ gpu::VideoEncodeAcceleratorSupportedProfile* out) { |
+ out->max_framerate_numerator = data.max_framerate_numerator(); |
+ out->max_framerate_denominator = data.max_framerate_denominator(); |
+ return data.ReadProfile(&out->profile) && |
+ data.ReadMaxResolution(&out->max_resolution); |
+} |
+ |
} // namespace mojo |