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

Unified Diff: cc/output/shader.cc

Issue 1786283002: Color adjustment test for running on perf bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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/shader.cc
diff --git a/cc/output/shader.cc b/cc/output/shader.cc
index 75cac6cbfd61f1c35250ab96e70b822eb621a04a..931c9aec54c980f5112249336d1c3d44fc3abe31 100644
--- a/cc/output/shader.cc
+++ b/cc/output/shader.cc
@@ -2087,6 +2087,13 @@ std::string FragmentShaderYUVVideo::GetShaderBody() {
float v_unsigned = TextureLookup(v_texture, uv_clamped).x;
vec3 yuv = vec3(y_raw, u_unsigned, v_unsigned) + yuv_adj;
vec3 rgb = yuv_matrix * yuv;
+ rgb = mix(rgb/4.5,
+ pow((rgb + vec3(0.0999, 0.0999, 0.0999)) / 1.099,
+ vec3(1.0/0.45, 1.0/0.45, 1.0/0.45)),
+ step(0.081, rgb));
+ rgb = mix(rgb * 12.92,
+ pow(rgb, vec3(1.0/2.4, 1.0/2.4, 1.0/2.4)) * 1.055 - vec3(0.055, 0.055, 0.055),
+ step(0.0031308, rgb));
gl_FragColor = vec4(rgb, 1.0) * alpha;
}
});
« 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