Index: src/gpu/gl/GrGLEffect.h |
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h |
index 52b1e921c1f5e0623ac215a613ed12064d6a1ae8..b6807383e6249b52385382c6d237d1eec0adc2f1 100644 |
--- a/src/gpu/gl/GrGLEffect.h |
+++ b/src/gpu/gl/GrGLEffect.h |
@@ -14,8 +14,6 @@ |
#include "GrGLShaderVar.h" |
#include "GrGLSL.h" |
-class GrGLTexture; |
- |
/** @file |
This file contains specializations for OpenGL of the shader stages declared in |
include/gpu/GrEffect.h. Objects of type GrGLEffect are responsible for emitting the |
@@ -34,6 +32,8 @@ class GrGLTexture; |
*/ |
class GrDrawEffect; |
+class GrGLTexture; |
+class GrGLVertexEffect; |
class GrGLEffect { |
@@ -48,7 +48,10 @@ public: |
kEffectKeyBits = GrBackendEffectFactory::kEffectKeyBits, |
}; |
- GrGLEffect(const GrBackendEffectFactory& factory) : fFactory(factory) {} |
+ GrGLEffect(const GrBackendEffectFactory& factory) |
+ : fFactory(factory) |
+ , fIsVertexEffect(false) { |
+ } |
virtual ~GrGLEffect() {} |
@@ -93,8 +96,17 @@ public: |
static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&) { return 0; } |
+ /** Used by the system when generating shader code, to see if this effect can be downcasted to |
+ the internal GrGLVertexEffect type */ |
+ bool isVertexEffect() const { return fIsVertexEffect; } |
+ |
protected: |
const GrBackendEffectFactory& fFactory; |
+ |
+private: |
+ friend class GrGLVertexEffect; // to set fIsVertexEffect |
+ |
+ bool fIsVertexEffect; |
}; |
#endif |