Mark when effects and programs have vertex code
Adds a 'hasVertexCode' method to GrEffect and a 'fHasVertexCode' field
to GrGLProgramDesc::KeyHeader. Also adds a GrVertexEffect class that
effects have to inherit from in order to set the 'hasVertexCode' flag
and be able to emit vertex code, and updates the existing effects to
use it as needed.
R=bsalomon@google.com
Author: cdalton@nvidia.com
Review URL: https://codereview.chromium.org/23653059
git-svn-id: http://skia.googlecode.com/svn/trunk@11537 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 6749b46..7063440 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -21,6 +21,8 @@
#include "gl/GrGLEffect.h"
#include "gl/GrGLSL.h"
+#include "effects/GrVertexEffect.h"
+
GrAAConvexPathRenderer::GrAAConvexPathRenderer() {
}
@@ -497,7 +499,7 @@
* Requires shader derivative instruction support.
*/
-class QuadEdgeEffect : public GrEffect {
+class QuadEdgeEffect : public GrVertexEffect {
public:
static GrEffectRef* Create() {
@@ -586,7 +588,7 @@
GR_DECLARE_EFFECT_TEST;
- typedef GrEffect INHERITED;
+ typedef GrVertexEffect INHERITED;
};
GR_DEFINE_EFFECT_TEST(QuadEdgeEffect);