| Index: src/gpu/gl/GrGLProgramDesc.cpp
|
| diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
|
| index 6867a1329b048b59384dfded65f122eee414d05b..3cfe20c2b7f7bb89e831d072666cbfbac49a8b62 100644
|
| --- a/src/gpu/gl/GrGLProgramDesc.cpp
|
| +++ b/src/gpu/gl/GrGLProgramDesc.cpp
|
| @@ -203,28 +203,33 @@ bool GrGLProgramDescBuilder::Build(const GrOptDrawState& optState,
|
| header->fUseNvpr = false;
|
| }
|
|
|
| - bool hasUniformColor = inputColorIsUsed && (isPathRendering || !descInfo.fHasVertexColor);
|
| + if (!optState.newStyle()) {
|
| + bool hasUniformColor = inputColorIsUsed && (isPathRendering || !descInfo.fHasVertexColor);
|
|
|
| - if (!inputColorIsUsed) {
|
| - header->fColorInput = GrProgramDesc::kAllOnes_ColorInput;
|
| - } else if (hasUniformColor) {
|
| - header->fColorInput = GrProgramDesc::kUniform_ColorInput;
|
| - } else {
|
| - header->fColorInput = GrProgramDesc::kAttribute_ColorInput;
|
| - SkASSERT(!header->fUseNvpr);
|
| - }
|
| + if (!inputColorIsUsed) {
|
| + header->fColorInput = GrProgramDesc::kAllOnes_ColorInput;
|
| + } else if (hasUniformColor) {
|
| + header->fColorInput = GrProgramDesc::kUniform_ColorInput;
|
| + } else {
|
| + header->fColorInput = GrProgramDesc::kAttribute_ColorInput;
|
| + SkASSERT(!header->fUseNvpr);
|
| + }
|
|
|
| - bool hasVertexCoverage = !isPathRendering && descInfo.fHasVertexCoverage;
|
| + bool hasVertexCoverage = !isPathRendering && descInfo.fHasVertexCoverage;
|
|
|
| - bool covIsSolidWhite = !hasVertexCoverage && 0xffffffff == optState.getCoverageColor();
|
| + bool covIsSolidWhite = !hasVertexCoverage && 0xffffffff == optState.getCoverageColor();
|
|
|
| - if (covIsSolidWhite || !inputCoverageIsUsed) {
|
| - header->fCoverageInput = GrProgramDesc::kAllOnes_ColorInput;
|
| - } else if (!hasVertexCoverage) {
|
| - header->fCoverageInput = GrProgramDesc::kUniform_ColorInput;
|
| + if (covIsSolidWhite || !inputCoverageIsUsed) {
|
| + header->fCoverageInput = GrProgramDesc::kAllOnes_ColorInput;
|
| + } else if (!hasVertexCoverage) {
|
| + header->fCoverageInput = GrProgramDesc::kUniform_ColorInput;
|
| + } else {
|
| + header->fCoverageInput = GrProgramDesc::kAttribute_ColorInput;
|
| + SkASSERT(!header->fUseNvpr);
|
| + }
|
| } else {
|
| + header->fColorInput = GrProgramDesc::kAttribute_ColorInput;
|
| header->fCoverageInput = GrProgramDesc::kAttribute_ColorInput;
|
| - SkASSERT(!header->fUseNvpr);
|
| }
|
|
|
| if (descInfo.fReadsDst) {
|
|
|