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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 1420943002: media: Compute proper VideoFrame::coded_rect for copies to GMBs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on master. Created 5 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 | « no previous file | media/video/gpu_memory_buffer_video_frame_pool.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 63d8a187bc69260d8cca98abe186afd3b8ac7e5b..82e32f8b56be5592753a5c9bd766c2d36b386ed0 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -233,18 +233,13 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
}
const gfx::Size ya_tex_size = coded_size;
- gfx::Size uv_tex_size;
+ gfx::Size uv_tex_size = media::VideoFrame::PlaneSize(
+ 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.
- DCHECK(visible_rect.origin().IsOrigin());
- DCHECK(visible_rect.size() == coded_size);
- uv_tex_size.SetSize((ya_tex_size.width() + 1) / 2,
- (ya_tex_size.height() + 1) / 2);
} else {
- uv_tex_size = media::VideoFrame::PlaneSize(
- frame_->format(), media::VideoFrame::kUPlane, coded_size);
DCHECK(uv_tex_size ==
media::VideoFrame::PlaneSize(
frame_->format(), media::VideoFrame::kVPlane, coded_size));
« no previous file with comments | « no previous file | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698