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

Unified Diff: src/effects/gradients/SkGradientShader.cpp

Issue 12547012: Make GrGLEffects use an interface to append their code. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShader.cpp
===================================================================
--- src/effects/gradients/SkGradientShader.cpp (revision 8005)
+++ src/effects/gradients/SkGradientShader.cpp (working copy)
@@ -787,13 +787,15 @@
const char* inputColor,
const GrGLShaderBuilder::TextureSampler& sampler) {
- SkString* code = &builder->fFSCode;
- code->appendf("\tvec2 coord = vec2(%s, %s);\n",
- gradientTValue,
- builder->getUniformVariable(fFSYUni).c_str());
- code->appendf("\t%s = ", outputColor);
- builder->appendTextureLookupAndModulate(code, inputColor, sampler, "coord");
- code->append(";\n");
+ builder->fsCodeAppendf("\tvec2 coord = vec2(%s, %s);\n",
+ gradientTValue,
+ builder->getUniformVariable(fFSYUni).c_str());
+ builder->fsCodeAppendf("\t%s = ", outputColor);
+ builder->appendTextureLookupAndModulate(GrGLShaderBuilder::kFragment_ShaderType,
+ inputColor,
+ sampler,
+ "coord");
+ builder->fsCodeAppend(";\n");
}
/////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698