| Index: src/gpu/gl/GrGLProgram.cpp
|
| diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
|
| index 435d0cdb02c988255244c53fc343ebf085fc44eb..5bc7d0b277a3fecd1a11a385003310793c9d6276 100644
|
| --- a/src/gpu/gl/GrGLProgram.cpp
|
| +++ b/src/gpu/gl/GrGLProgram.cpp
|
| @@ -154,7 +154,7 @@ void GrGLProgram::setColor(const GrDrawState& drawState,
|
| GrColor color,
|
| SharedGLState* sharedState) {
|
| const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader();
|
| - if (!drawState.hasColorVertexAttribute()) {
|
| + if (!drawState.hasColorVertexAttribute() || drawState.canIgnoreColorAttribute()) {
|
| switch (header.fColorInput) {
|
| case GrGLProgramDesc::kAttribute_ColorInput:
|
| SkASSERT(-1 != header.fColorAttributeIndex);
|
| @@ -178,12 +178,8 @@ void GrGLProgram::setColor(const GrDrawState& drawState,
|
| }
|
| sharedState->fConstAttribColorIndex = -1;
|
| break;
|
| - case GrGLProgramDesc::kSolidWhite_ColorInput:
|
| - case GrGLProgramDesc::kTransBlack_ColorInput:
|
| - sharedState->fConstAttribColorIndex = -1;
|
| - break;
|
| default:
|
| - SkFAIL("Unknown color type.");
|
| + SkFAIL("Unexpected color type.");
|
| }
|
| } else {
|
| sharedState->fConstAttribColorIndex = -1;
|
| @@ -218,11 +214,10 @@ void GrGLProgram::setCoverage(const GrDrawState& drawState,
|
| sharedState->fConstAttribCoverageIndex = -1;
|
| break;
|
| case GrGLProgramDesc::kSolidWhite_ColorInput:
|
| - case GrGLProgramDesc::kTransBlack_ColorInput:
|
| sharedState->fConstAttribCoverageIndex = -1;
|
| break;
|
| default:
|
| - SkFAIL("Unknown coverage type.");
|
| + SkFAIL("Unexpected coverage type.");
|
| }
|
| } else {
|
| sharedState->fConstAttribCoverageIndex = -1;
|
|
|