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

Unified Diff: media/blink/video_frame_compositor.cc

Issue 1154153003: Relanding 1143663007: VideoFrame: Separate Pixel Format from Storage Type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NV12 support in CrOS Created 5 years, 7 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/blink/skcanvas_video_renderer.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/video_frame_compositor.cc
diff --git a/media/blink/video_frame_compositor.cc b/media/blink/video_frame_compositor.cc
index 2be84adab3c80b15e015f62d942cebaed08f58f9..d815fd18137246dd87d840346a6e89f76b08f446 100644
--- a/media/blink/video_frame_compositor.cc
+++ b/media/blink/video_frame_compositor.cc
@@ -16,21 +16,20 @@ namespace media {
// background rendering to keep the Render() callbacks moving.
const int kBackgroundRenderingTimeoutMs = 250;
+// Returns true if the format has no Alpha channel (hence is always opaque).
static bool IsOpaque(const scoped_refptr<VideoFrame>& frame) {
switch (frame->format()) {
case VideoFrame::UNKNOWN:
case VideoFrame::YV12:
- case VideoFrame::YV16:
case VideoFrame::I420:
+ case VideoFrame::YV16:
case VideoFrame::YV24:
+#if defined(OS_MACOSX) || defined(OS_CHROMEOS)
case VideoFrame::NV12:
+#endif
+ case VideoFrame::XRGB:
return true;
-
case VideoFrame::YV12A:
-#if defined(VIDEO_HOLE)
- case VideoFrame::HOLE:
-#endif // defined(VIDEO_HOLE)
- case VideoFrame::NATIVE_TEXTURE:
case VideoFrame::ARGB:
break;
}
« no previous file with comments | « media/blink/skcanvas_video_renderer.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698