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

Unified Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 385163004: Revert of Remove gpu shader optimatization for solid white or trans black colors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 | « src/gpu/gl/GrGLProgramDesc.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/GrGLShaderBuilder.cpp
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index d0c35b3b731554ae571a25c15a37094297ba1319..4b7de027936df1debe1adc44f1b74fc6c24a26d1 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -164,6 +164,10 @@
this->addUniform(GrGLShaderBuilder::kFragment_Visibility, kVec4f_GrSLType, "Color",
&name);
inputColor = GrGLSLExpr4(name);
+ } else if (GrGLProgramDesc::kSolidWhite_ColorInput == header.fColorInput) {
+ inputColor = GrGLSLExpr4(1);
+ } else if (GrGLProgramDesc::kTransBlack_ColorInput == header.fColorInput) {
+ inputColor = GrGLSLExpr4(0);
}
if (GrGLProgramDesc::kUniform_ColorInput == header.fCoverageInput) {
@@ -174,6 +178,8 @@
inputCoverage = GrGLSLExpr4(name);
} else if (GrGLProgramDesc::kSolidWhite_ColorInput == header.fCoverageInput) {
inputCoverage = GrGLSLExpr4(1);
+ } else if (GrGLProgramDesc::kTransBlack_ColorInput == header.fCoverageInput) {
+ inputCoverage = GrGLSLExpr4(0);
}
if (k110_GrGLSLGeneration != fGpu->glslGeneration()) {
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698