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

Unified Diff: cc/output/gl_renderer.cc

Issue 2799603006: cc: Fix VideoResourceUpdater color conversion (Closed)
Patch Set: Created 3 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
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 9b2eb3e50baa982dc4364d3a14952459c51db0da..612c31564878454e01636cf365f22a615440907e 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -3003,19 +3003,19 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
void GLRenderer::SetUseProgram(const ProgramKey& program_key,
const gfx::ColorSpace& src_color_space) {
+ // The source color space for non-YUV draw quads should always be full-range
+ // RGB.
+ if (!disable_color_checks_for_testing_)
+ DCHECK_EQ(src_color_space, src_color_space.GetAsFullRangeRGB());
+
// Ensure that we do not apply any color conversion unless the color correct
// rendering flag has been specified. This is because media mailboxes will
// provide YUV color spaces despite YUV to RGB conversion already having been
// performed.
- // TODO(ccameron): Ensure that media mailboxes be accurate.
- // https://crbug.com/699243
- // The source color space for non-YUV draw quads should always be full-range
- // RGB.
if (settings_->enable_color_correct_rendering) {
SetUseProgram(program_key, src_color_space,
current_frame()->current_render_pass->color_space);
} else {
- DCHECK_EQ(src_color_space, src_color_space.GetAsFullRangeRGB());
SetUseProgram(program_key, gfx::ColorSpace(), gfx::ColorSpace());
}
}

Powered by Google App Engine
This is Rietveld 408576698