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

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
Index: src/gpu/gl/GrGLEffect.h
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index 0463ed91c857777f6a5408421f39e7c2bbb5f040..40f511540b7385fe1a4bd21c3d7ed9a18fbc73ab 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -73,6 +73,17 @@ public:
GrGLEffect. These can be passed to the builder to emit texture
reads in the generated code.
*/
+ virtual void emitCode(GrGLFullShaderBuilder* builder,
+ const GrDrawEffect& drawEffect,
+ EffectKey key,
+ const char* outputColor,
+ const char* inputColor,
+ const TransformedCoordsArray& coords,
+ const TextureSamplerArray& samplers) {
+ GrGLShaderBuilder* baseBuilder = builder;
+ this->emitCode(baseBuilder, drawEffect, key, outputColor, inputColor, coords, samplers);
+ }
+
virtual void emitCode(GrGLShaderBuilder* builder,
const GrDrawEffect& drawEffect,
EffectKey key,
@@ -98,4 +109,32 @@ protected:
const GrBackendEffectFactory& fFactory;
};
+////////////////////////////////////////////////////////////////////////////////
+
+class GrGLVertexEffect : public GrGLEffect {
+public:
+ GrGLVertexEffect(const GrBackendEffectFactory& factory) : INHERITED(factory) {}
+
+ virtual void emitCode(GrGLFullShaderBuilder* builder,
+ const GrDrawEffect& drawEffect,
+ EffectKey key,
+ const char* outputColor,
+ const char* inputColor,
+ const TransformedCoordsArray& coords,
+ const TextureSamplerArray& samplers) SK_OVERRIDE = 0;
+
+ virtual void emitCode(GrGLShaderBuilder* builder,
bsalomon 2013/10/03 14:44:52 Is this a case where it would make sense to redecl
Chris Dalton 2013/10/03 21:43:22 Done. (It will be enough protection to hide the Gr
+ const GrDrawEffect& drawEffect,
+ EffectKey key,
+ const char* outputColor,
+ const char* inputColor,
+ const TransformedCoordsArray& coords,
+ const TextureSamplerArray& samplers) SK_OVERRIDE {
+ GrCrash("GrGLVertexEffect requires a GrGLFullShaderBuilder in emitCode.");
+ }
+
+private:
+ typedef GrGLEffect INHERITED;
+};
+
#endif

Powered by Google App Engine
This is Rietveld 408576698