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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 2773103002: cc: Unify all sources of color space for YUVVideoDrawQuad (Closed)
Patch Set: Created 3 years, 9 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 | « cc/ipc/struct_traits_unittest.cc ('k') | cc/output/gl_renderer.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 d63ab87c7ae41664b353642f6a4779a1f92b8ade..4898963c9d7de6fec28e11b2713a0d395c56c9bf 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -225,17 +225,6 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
break;
}
case VideoFrameExternalResources::YUV_RESOURCE: {
- YUVVideoDrawQuad::ColorSpace color_space = YUVVideoDrawQuad::REC_601;
- int videoframe_color_space;
- if (frame_->metadata()->GetInteger(media::VideoFrameMetadata::COLOR_SPACE,
- &videoframe_color_space)) {
- if (videoframe_color_space == media::COLOR_SPACE_JPEG) {
- color_space = YUVVideoDrawQuad::JPEG;
- } else if (videoframe_color_space == media::COLOR_SPACE_HD_REC709) {
- color_space = YUVVideoDrawQuad::REC_709;
- }
- }
-
const gfx::Size ya_tex_size = coded_size;
gfx::Size uv_tex_size = media::VideoFrame::PlaneSize(
frame_->format(), media::VideoFrame::kUPlane, coded_size);
@@ -280,9 +269,9 @@ void VideoLayerImpl::AppendQuads(RenderPass* render_pass,
frame_resources_[0].id, frame_resources_[1].id,
frame_resources_.size() > 2 ? frame_resources_[2].id
: frame_resources_[1].id,
- frame_resources_.size() > 3 ? frame_resources_[3].id : 0, color_space,
- frame_->ColorSpace(), frame_resource_offset_,
- frame_resource_multiplier_, frame_bits_per_channel_);
+ frame_resources_.size() > 3 ? frame_resources_[3].id : 0,
+ frame_resource_offset_, frame_resource_multiplier_,
+ frame_bits_per_channel_);
ValidateQuadResources(yuv_video_quad);
break;
}
« no previous file with comments | « cc/ipc/struct_traits_unittest.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698