Index: src/gpu/gl/GrGLProgramDesc.cpp |
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp |
index 733de13dc6cd6bf0b73774ab76d22617a05004ce..79088137caa004519ddcd91d2ad13ad000f5ab40 100644 |
--- a/src/gpu/gl/GrGLProgramDesc.cpp |
+++ b/src/gpu/gl/GrGLProgramDesc.cpp |
@@ -257,8 +257,8 @@ |
header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType; |
- bool isPathRendering = GrGpu::IsPathRenderingDrawType(drawType); |
- if (gpu->caps()->pathRenderingSupport() && isPathRendering && |
+ if (gpu->caps()->pathRenderingSupport() && |
+ GrGpu::IsPathRenderingDrawType(drawType) && |
gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode) { |
header->fUseFragShaderOnly = true; |
SkASSERT(!optState.hasGeometryProcessor()); |
@@ -266,15 +266,12 @@ |
header->fUseFragShaderOnly = false; |
} |
- bool hasUniformColor = inputColorIsUsed && |
- (isPathRendering || !optState.hasColorVertexAttribute()); |
- |
- bool hasUniformCoverage = inputCoverageIsUsed && |
- (isPathRendering || !optState.hasCoverageVertexAttribute()); |
+ bool defaultToUniformInputs = GrGpu::IsPathRenderingDrawType(drawType) || |
+ GR_GL_NO_CONSTANT_ATTRIBUTES; |
if (!inputColorIsUsed) { |
header->fColorInput = kAllOnes_ColorInput; |
- } else if (hasUniformColor) { |
+ } else if (defaultToUniformInputs && !optState.hasColorVertexAttribute()) { |
header->fColorInput = kUniform_ColorInput; |
} else { |
header->fColorInput = kAttribute_ColorInput; |
@@ -286,7 +283,7 @@ |
if (covIsSolidWhite || !inputCoverageIsUsed) { |
header->fCoverageInput = kAllOnes_ColorInput; |
- } else if (hasUniformCoverage) { |
+ } else if (defaultToUniformInputs && !optState.hasCoverageVertexAttribute()) { |
header->fCoverageInput = kUniform_ColorInput; |
} else { |
header->fCoverageInput = kAttribute_ColorInput; |