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/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index dccd4bb..a695173 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -29,9 +29,10 @@
const GrEffectStage* colorStages[],
const GrEffectStage* coverageStages[]) {
SkAutoTDelete<GrGLProgramBuilder> builder;
- if (!desc.getHeader().fRequiresVertexShader &&
- gpu->glCaps().pathRenderingSupport() &&
- gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunction_TexturingMode) {
+ if (desc.getHeader().fUseFragShaderOnly) {
+ SkASSERT(gpu->glCaps().pathRenderingSupport());
+ SkASSERT(gpu->glPathRendering()->texturingMode() ==
+ GrGLPathRendering::FixedFunction_TexturingMode);
SkASSERT(NULL == geometryProcessor);
builder.reset(SkNEW_ARGS(GrGLFragmentOnlyProgramBuilder, (gpu, desc)));
} else {