Chromium Code Reviews| Index: src/gpu/gl/GrGLProgramDesc.cpp |
| diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp |
| index 79088137caa004519ddcd91d2ad13ad000f5ab40..fafcfbaae470d4dc1e38f962de211f57a3b38d59 100644 |
| --- a/src/gpu/gl/GrGLProgramDesc.cpp |
| +++ b/src/gpu/gl/GrGLProgramDesc.cpp |
| @@ -224,8 +224,11 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
| int offsetAndSizeIndex = 0; |
| - // We can only have one effect which touches the vertex shader |
| - if (optState.hasGeometryProcessor()) { |
| + bool noGP = gpu->caps()->pathRenderingSupport() && GrGpu::IsPathRenderingDrawType(drawType); |
| + |
| + // We can only have one effect which touches the vertex shader, optState will install a |
| + // default GP if none are available |
| + if (!noGP) { |
| if (!BuildStagedProcessorKey<GeometryProcessorKeyBuilder>(*optState.getGeometryProcessor(), |
| gpu->glCaps(), |
| false, |
| @@ -253,15 +256,13 @@ bool GrGLProgramDesc::Build(const GrOptDrawState& optState, |
| // make sure any padding in the header is zeroed. |
| memset(header, 0, kHeaderSize); |
| - header->fHasGeometryProcessor = optState.hasGeometryProcessor(); |
| - |
| header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType; |
| - if (gpu->caps()->pathRenderingSupport() && |
| - GrGpu::IsPathRenderingDrawType(drawType) && |
| + if (noGP && |
| gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode) { |
| + // We still have a default geometry processor installed on the opt draw state, but it is |
|
bsalomon
2014/10/27 13:43:43
I think we will have to figure out how to make the
|
| + // ignored for generating keys, and also ignored in the programbuilder |
| header->fUseFragShaderOnly = true; |
| - SkASSERT(!optState.hasGeometryProcessor()); |
| } else { |
| header->fUseFragShaderOnly = false; |
| } |