Change GrGLProgramDesc header to have DoPathRendering flag instead of RequiresVertexShader

Also update GLProgramTests to fix bug where it would incorrectly try to PathRendering when we did
not want to.

BUG=skia:
R=bsalomon@google.com, joshualitt@chromium.org

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/586793002
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index c6560be..c0a9e13 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -163,7 +163,7 @@
                             GrGpu::DrawType drawType,
                             GrBlendCoeff srcCoeff,
                             GrBlendCoeff dstCoeff,
-                            const GrGpuGL* gpu,
+                            GrGpuGL* gpu,
                             const GrDeviceCoordTexture* dstCopy,
                             const GrEffectStage** geometryProcessor,
                             SkTArray<const GrEffectStage*, true>* colorStages,
@@ -260,12 +260,11 @@
     // 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->fUseFragShaderOnly = gpu->caps()->pathRenderingSupport() &&
+        GrGpu::IsPathRenderingDrawType(drawType) &&
+        gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode;
+    SkASSERT(!header->fUseFragShaderOnly || !optState.hasGeometryProcessor());
+
     header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType;
 
     // Currently the experimental GS will only work with triangle prims (and it doesn't do anything
@@ -277,7 +276,7 @@
     header->fExperimentalGS = false;
 #endif
 #endif
-    bool defaultToUniformInputs = GR_GL_NO_CONSTANT_ATTRIBUTES || gpu->caps()->pathRenderingSupport();
+    bool defaultToUniformInputs = GR_GL_NO_CONSTANT_ATTRIBUTES || header->fUseFragShaderOnly;
 
     if (!inputColorIsUsed) {
         header->fColorInput = kAllOnes_ColorInput;
@@ -285,7 +284,7 @@
         header->fColorInput = kUniform_ColorInput;
     } else {
         header->fColorInput = kAttribute_ColorInput;
-        header->fRequiresVertexShader = true;
+        header->fUseFragShaderOnly = false;
     }
 
     bool covIsSolidWhite = !requiresCoverageAttrib && 0xffffffff == optState.getCoverageColor();
@@ -296,7 +295,7 @@
         header->fCoverageInput = kUniform_ColorInput;
     } else {
         header->fCoverageInput = kAttribute_ColorInput;
-        header->fRequiresVertexShader = true;
+        header->fUseFragShaderOnly = false;
     }
 
     if (optState.readsDst()) {