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

Unified Diff: cc/output/shader.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/output/renderer_pixeltest.cc ('k') | cc/output/software_renderer.h » ('j') | 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 b2d76a7e02e770b3f1da95f2abd5873ef70a4092..354f65f67b92ffb17447b9219c7b9c6102d2ed8e 100644
--- a/cc/output/shader.cc
+++ b/cc/output/shader.cc
@@ -804,12 +804,12 @@ std::string FragmentTexBlendMode::GetHelperFunctions() const {
float outLum = luminance(outColor);
float minComp = min(min(outColor.r, outColor.g), outColor.b);
float maxComp = max(max(outColor.r, outColor.g), outColor.b);
- if (minComp < 0.0) {
+ if (minComp < 0.0 && outLum != minComp) {
outColor = outLum +
((outColor - vec3(outLum, outLum, outLum)) * outLum) /
(outLum - minComp);
}
- if (maxComp > alpha) {
+ if (maxComp > alpha && maxComp != outLum) {
outColor =
outLum +
((outColor - vec3(outLum, outLum, outLum)) * (alpha - outLum)) /
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/output/software_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698