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

Unified Diff: services/video_capture/public/interfaces/video_capture_format_traits.cc

Issue 2398813002: Cleanup of video capture into GpuMemoryBuffer (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « media/capture/video/video_capture_device_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/public/interfaces/video_capture_format_traits.cc
diff --git a/services/video_capture/public/interfaces/video_capture_format_traits.cc b/services/video_capture/public/interfaces/video_capture_format_traits.cc
index 10ed015d30e3861c675ae9110ebbd8c1202002c2..f24ca5703847dc9dd3ec411b5846b8afac01e444 100644
--- a/services/video_capture/public/interfaces/video_capture_format_traits.cc
+++ b/services/video_capture/public/interfaces/video_capture_format_traits.cc
@@ -33,13 +33,7 @@ bool StructTraits<video_capture::mojom::VideoCaptureFormatDataView,
video_capture::mojom::VideoPixelStorage
EnumTraits<video_capture::mojom::VideoPixelStorage, media::VideoPixelStorage>::
ToMojom(media::VideoPixelStorage video_pixel_storage) {
- switch (video_pixel_storage) {
- case media::PIXEL_STORAGE_CPU:
- return video_capture::mojom::VideoPixelStorage::CPU;
- case media::PIXEL_STORAGE_GPUMEMORYBUFFER:
- return video_capture::mojom::VideoPixelStorage::GPUMEMORYBUFFER;
- }
- NOTREACHED();
+ DCHECK_EQ(media::PIXEL_STORAGE_CPU, video_pixel_storage);
return video_capture::mojom::VideoPixelStorage::CPU;
}
@@ -48,16 +42,9 @@ bool EnumTraits<video_capture::mojom::VideoPixelStorage,
media::VideoPixelStorage>::
FromMojom(video_capture::mojom::VideoPixelStorage input,
media::VideoPixelStorage* out) {
- switch (input) {
- case video_capture::mojom::VideoPixelStorage::CPU:
- *out = media::PIXEL_STORAGE_CPU;
- return true;
- case video_capture::mojom::VideoPixelStorage::GPUMEMORYBUFFER:
- *out = media::PIXEL_STORAGE_GPUMEMORYBUFFER;
- return true;
- }
- NOTREACHED();
- return false;
+ DCHECK_EQ(video_capture::mojom::VideoPixelStorage::CPU, input);
+ *out = media::PIXEL_STORAGE_CPU;
+ return true;
}
} // namespace mojo
« no previous file with comments | « media/capture/video/video_capture_device_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698