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

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

Issue 23754003: Isolate VertexBuilder from GrGLShaderBuilder (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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/GrBezierEffect.cpp ('k') | src/gpu/gl/GrGLEffectMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrSimpleTextureEffect.cpp
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 7a1692b32532517cb77cbbfa306288149a99dbd4..ccf761ab946c96e8d1e5ab3dbe5d7e804aaf5eca 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -39,11 +39,13 @@ public:
fsCoordSLType = kVec2f_GrSLType;
const char* vsVaryingName;
const char* fsVaryingNamePtr;
- builder->addVarying(kVec2f_GrSLType, "textureCoords", &vsVaryingName, &fsVaryingNamePtr);
+ GrGLShaderBuilder::VertexBuilder* vertexBuilder = builder->getVertexBuilder();
+ SkASSERT(NULL != vertexBuilder);
+ vertexBuilder->addVarying(kVec2f_GrSLType, "textureCoords", &vsVaryingName, &fsVaryingNamePtr);
fsCoordName = fsVaryingNamePtr;
const char* attrName =
- builder->getEffectAttributeName(drawEffect.getVertexAttribIndices()[0])->c_str();
- builder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, attrName);
+ vertexBuilder->getEffectAttributeName(drawEffect.getVertexAttribIndices()[0])->c_str();
+ vertexBuilder->vsCodeAppendf("\t%s = %s;\n", vsVaryingName, attrName);
} else {
fsCoordSLType = fEffectMatrix.get()->emitCode(builder, key, &fsCoordName);
}
« no previous file with comments | « src/gpu/effects/GrBezierEffect.cpp ('k') | src/gpu/gl/GrGLEffectMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698