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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 796573002: fix for chrome bug with sub pixel hairlines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 6 years 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 | « gm/hairlines.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index 8ea03fbba7ff50c0d475336793c6a0dca0f42aca..daa0b6ba064205fccc2f89605d07f35bb6828841 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -237,9 +237,13 @@ void GrGLProgramBuilder::emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr
if (GrProgramDesc::kAttribute_ColorInput == header.fColorInput) {
*inputColor = outputColor;
}
- if (GrProgramDesc::kUniform_ColorInput != header.fCoverageInput) {
- *inputCoverage = outputCoverage;
+
+ // We may have uniform coverage, if so we need to multiply the GPs output by the uniform
+ // coverage
+ if (GrProgramDesc::kUniform_ColorInput == header.fCoverageInput) {
+ fFS.codeAppendf("%s *= %s;", outputCoverage.c_str(), inputCoverage->c_str());
}
+ *inputCoverage = outputCoverage;
}
fFragmentProcessors.reset(SkNEW(GrGLInstalledFragProcs));
« no previous file with comments | « gm/hairlines.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698