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

Unified Diff: src/gpu/effects/GrCustomCoordsTextureEffect.cpp

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/effects/GrCustomCoordsTextureEffect.cpp
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
index b14de8bd34128de2128359d814dd6aa230bdd5b1..c4cea176d82bbd4d4e94099f8d92136150c2e435 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
@@ -12,31 +12,29 @@
#include "GrTBackendEffectFactory.h"
#include "GrTexture.h"
-class GrGLCustomCoordsTextureEffect : public GrGLEffect {
+class GrGLCustomCoordsTextureEffect : public GrGLVertexEffect {
public:
GrGLCustomCoordsTextureEffect(const GrBackendEffectFactory& factory, const GrDrawEffect& drawEffect)
: INHERITED (factory) {}
- virtual void emitCode(GrGLShaderBuilder* builder,
+ virtual void emitCode(GrGLFullShaderBuilder* builder,
const GrDrawEffect& drawEffect,
EffectKey key,
const char* outputColor,
const char* inputColor,
const TransformedCoordsArray&,
const TextureSamplerArray& samplers) SK_OVERRIDE {
- GrGLShaderBuilder::VertexBuilder* vertexBuilder = builder->getVertexBuilder();
- SkASSERT(NULL != vertexBuilder);
SkASSERT(1 == drawEffect.castEffect<GrCustomCoordsTextureEffect>().numVertexAttribs());
SkString fsCoordName;
const char* vsVaryingName;
const char* fsVaryingNamePtr;
- vertexBuilder->addVarying(kVec2f_GrSLType, "textureCoords", &vsVaryingName, &fsVaryingNamePtr);
+ builder->addVarying(kVec2f_GrSLType, "textureCoords", &vsVaryingName, &fsVaryingNamePtr);
fsCoordName = fsVaryingNamePtr;
const char* attrName =
- vertexBuilder->getEffectAttributeName(drawEffect.getVertexAttribIndices()[0])->c_str();
- vertexBuilder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, attrName);
+ builder->getEffectAttributeName(drawEffect.getVertexAttribIndices()[0])->c_str();
+ builder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, attrName);
builder->fsCodeAppendf("\t%s = ", outputColor);
builder->fsAppendTextureLookupAndModulate(inputColor,
@@ -50,7 +48,7 @@ public:
const GrDrawEffect& drawEffect) SK_OVERRIDE {}
private:
- typedef GrGLEffect INHERITED;
+ typedef GrGLVertexEffect INHERITED;
};
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698