Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: src/gpu/gl/GrGLEffect.h

Issue 25474006: Move VertexBuilder to a GrGLFullShaderBuilder subclass (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrCustomCoordsTextureEffect.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/gpu/effects/GrCustomCoordsTextureEffect.cpp ('k') | src/gpu/gl/GrGLProgram.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698