Add a requiresVertexShader method to GrGLEffect
Adds requiresVertexShader to GrGLEffect and updates the necessary
effects to override it and return true. Also reworks GrGLProgram
and GrGLShaderBuilder so the program creates all the GL effects
at the beginning, and determines if it needs a vertex shader before
creating the shader builder.
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://chromiumcodereview.appspot.com/23471008
git-svn-id: http://skia.googlecode.com/svn/trunk@11140 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAARectRenderer.cpp b/src/gpu/GrAARectRenderer.cpp
index 9d436c3..b104df5 100644
--- a/src/gpu/GrAARectRenderer.cpp
+++ b/src/gpu/GrAARectRenderer.cpp
@@ -44,6 +44,8 @@
GLEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&)
: INHERITED (factory) {}
+ virtual bool requiresVertexShader(const GrDrawEffect&) const SK_OVERRIDE { return true; }
+
virtual void emitCode(GrGLShaderBuilder* builder,
const GrDrawEffect& drawEffect,
EffectKey key,
@@ -164,6 +166,8 @@
GLEffect(const GrBackendEffectFactory& factory, const GrDrawEffect&)
: INHERITED (factory) {}
+ virtual bool requiresVertexShader(const GrDrawEffect&) const SK_OVERRIDE { return true; }
+
virtual void emitCode(GrGLShaderBuilder* builder,
const GrDrawEffect& drawEffect,
EffectKey key,