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

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

Issue 525433002: When ignoring color input don't use vertex attribs on gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Put transBlack coverage back to 0 Created 6 years, 4 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.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 286924e1ef320ef5ba4bc76f23cd4ab08f74c5d1..545ed2114c7d5ea01512cae139f7f0537bb9e15b 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -188,7 +188,9 @@ bool GrGLProgramDesc::Build(const GrDrawState& drawState,
#endif
bool defaultToUniformInputs = GR_GL_NO_CONSTANT_ATTRIBUTES || gpu->caps()->pathRenderingSupport();
- if (defaultToUniformInputs && !requiresColorAttrib && inputColorIsUsed) {
+ if (!inputColorIsUsed && !skipColor) {
+ header->fColorInput = kAllOnes_ColorInput;
+ } else if (defaultToUniformInputs && !requiresColorAttrib && inputColorIsUsed) {
header->fColorInput = kUniform_ColorInput;
} else {
header->fColorInput = kAttribute_ColorInput;
@@ -198,7 +200,7 @@ bool GrGLProgramDesc::Build(const GrDrawState& drawState,
bool covIsSolidWhite = !requiresCoverageAttrib && 0xffffffff == drawState.getCoverageColor();
if ((covIsSolidWhite || !inputCoverageIsUsed) && !skipCoverage) {
- header->fCoverageInput = kSolidWhite_ColorInput;
+ header->fCoverageInput = kAllOnes_ColorInput;
} else if (defaultToUniformInputs && !requiresCoverageAttrib && inputCoverageIsUsed) {
header->fCoverageInput = kUniform_ColorInput;
} else {
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.h ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698