Index: src/gpu/gl/GrGLProgramDesc.cpp |
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp |
index b8740912643012d2bbef2008774bc2b8fc7e6874..dfe0be49e2b0661bbf25226bf0ac75bbf2a50685 100644 |
--- a/src/gpu/gl/GrGLProgramDesc.cpp |
+++ b/src/gpu/gl/GrGLProgramDesc.cpp |
@@ -39,7 +39,7 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
GrGpu::DrawType drawType, |
GrBlendCoeff srcCoeff, |
GrBlendCoeff dstCoeff, |
- const GrGpuGL* gpu, |
+ GrGpuGL* gpu, |
const GrDeviceCoordTexture* dstCopy, |
const GrEffectStage** geometryProcessor, |
SkTArray<const GrEffectStage*, true>* colorStages, |
@@ -136,12 +136,11 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
// Because header is a pointer into the dynamic array, we can't push any new data into the key |
// below here. |
- // We will only require a vertex shader if we have more than just the position VA attrib. |
- // If we have a geom processor we must us a vertex shader and we should not have a geometry |
- // processor if we are doing path rendering. |
- SkASSERT(!GrGpu::IsPathRenderingDrawType(drawType) || !optState.requiresVertexShader()); |
- header->fRequiresVertexShader = optState.requiresVertexShader() || |
- !GrGpu::IsPathRenderingDrawType(drawType); |
+ header->fDoPathRendering = gpu->caps()->pathRenderingSupport() && |
egdaniel
2014/09/19 17:18:45
in a future CL I may move this logic into ODS.
|
+ GrGpu::IsPathRenderingDrawType(drawType) && |
+ gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode; |
+ SkASSERT(!header->fDoPathRendering || !optState.hasGeometryProcessor()); |
+ |
header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType; |
// Currently the experimental GS will only work with triangle prims (and it doesn't do anything |
@@ -153,7 +152,7 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
header->fExperimentalGS = false; |
#endif |
#endif |
- bool defaultToUniformInputs = GR_GL_NO_CONSTANT_ATTRIBUTES || gpu->caps()->pathRenderingSupport(); |
+ bool defaultToUniformInputs = GR_GL_NO_CONSTANT_ATTRIBUTES || header->fDoPathRendering; |
if (!inputColorIsUsed) { |
header->fColorInput = kAllOnes_ColorInput; |
@@ -161,7 +160,7 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
header->fColorInput = kUniform_ColorInput; |
} else { |
header->fColorInput = kAttribute_ColorInput; |
- header->fRequiresVertexShader = true; |
+ header->fDoPathRendering = false; |
} |
bool covIsSolidWhite = !requiresCoverageAttrib && 0xffffffff == optState.getCoverageColor(); |
@@ -172,7 +171,7 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
header->fCoverageInput = kUniform_ColorInput; |
} else { |
header->fCoverageInput = kAttribute_ColorInput; |
- header->fRequiresVertexShader = true; |
+ header->fDoPathRendering = false; |
} |
if (optState.readsDst()) { |