summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-04-28 17:15:57 -0700
committerDan Stoza <stoza@google.com>2015-04-29 12:27:18 -0700
commitad84681d31a7561344f72fe1b4e682ebc7a2ff6b (patch)
tree53dff44bc4d6c1495d654c7da98d3fda2aae5788 /services/surfaceflinger
parent8de71a2408f632407c25942a39c31f78c7f64ffd (diff)
downloadframeworks_native-ad84681d31a7561344f72fe1b4e682ebc7a2ff6b.zip
frameworks_native-ad84681d31a7561344f72fe1b4e682ebc7a2ff6b.tar.gz
frameworks_native-ad84681d31a7561344f72fe1b4e682ebc7a2ff6b.tar.bz2
Remove gamma correction from color correction shader
Gamma correction was incorrectly skewing both color inversion and Daltonization, which resulted in washed-out colors. Bug: 20346301 Change-Id: I34d879f902c3be115b2d23f09c3ed3902799759e (cherry picked from commit 3acd9f1d8fdffc0ed0837ebbabcac0c4014015b3)
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r--services/surfaceflinger/RenderEngine/ProgramCache.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/services/surfaceflinger/RenderEngine/ProgramCache.cpp b/services/surfaceflinger/RenderEngine/ProgramCache.cpp
index 0de5cca..ba11259 100644
--- a/services/surfaceflinger/RenderEngine/ProgramCache.cpp
+++ b/services/surfaceflinger/RenderEngine/ProgramCache.cpp
@@ -199,10 +199,8 @@ String8 ProgramCache::generateFragmentShader(const Key& needs) {
// un-premultiply if needed before linearization
fs << "gl_FragColor.rgb = gl_FragColor.rgb/gl_FragColor.a;";
}
- fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(2.2));";
fs << "vec4 transformed = colorMatrix * vec4(gl_FragColor.rgb, 1);";
fs << "gl_FragColor.rgb = transformed.rgb/transformed.a;";
- fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0 / 2.2));";
if (!needs.isOpaque() && needs.isPremultiplied()) {
// and re-premultiply if needed after gamma correction
fs << "gl_FragColor.rgb = gl_FragColor.rgb*gl_FragColor.a;";