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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 1869303004: media: Implement zero-copy video playback for VP8. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: optimize only VP8 Created 4 years, 8 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 | « no previous file | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer_impl.cc
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index f22860c746c8b050a6e23fb7f4f343e80af9617c..e8abac783cf44aca219552d1b4d27f5db0809531 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -250,8 +250,15 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
frame_->format(), media::VideoFrame::kUPlane, coded_size);
if (frame_->HasTextures()) {
- DCHECK_EQ(media::PIXEL_FORMAT_I420, frame_->format());
- DCHECK_EQ(3u, frame_resources_.size()); // Alpha is not supported yet.
+ if (DCHECK_IS_ON()) {
+ if (frame_->format() == media::PIXEL_FORMAT_I420) {
+ DCHECK_EQ(3u, frame_resources_.size());
+ } else if (frame_->format() == media::PIXEL_FORMAT_YV12A) {
+ DCHECK_EQ(4u, frame_resources_.size());
+ } else {
+ NOTREACHED();
+ }
+ }
} else {
DCHECK(uv_tex_size ==
media::VideoFrame::PlaneSize(
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698