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

Unified Diff: cc/output/gl_renderer.cc

Issue 2734223002: cc: Don't apply YUV color conversion to non-YUV draw quads (Closed)
Patch Set: add TODO 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 1eac5f85d19fd7268dc7b9c2d33a9288ab115f9b..2a2ffff1638a7722e4d424cabd443d11ff15e506 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2977,10 +2977,18 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
void GLRenderer::SetUseProgram(const ProgramKey& program_key,
const gfx::ColorSpace& src_color_space) {
- gfx::ColorSpace dst_color_space;
- if (settings_->enable_color_correct_rendering)
- dst_color_space = current_frame()->current_render_pass->color_space;
- SetUseProgram(program_key, src_color_space, dst_color_space);
+ // 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
+ if (settings_->enable_color_correct_rendering) {
+ SetUseProgram(program_key, src_color_space,
+ current_frame()->current_render_pass->color_space);
+ } else {
+ SetUseProgram(program_key, gfx::ColorSpace(), gfx::ColorSpace());
+ }
}
void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698