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

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

Issue 1457543003: Add ShaderBuilders to EmitArgs and remove gettings from ProgBuilder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConstColorProcessor.cpp
diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp
index f379e589cd498d5ef9496747081d8001fd36e521..cf567aac5c4f08d91b07131e297a61913a4d3705 100644
--- a/src/gpu/effects/GrConstColorProcessor.cpp
+++ b/src/gpu/effects/GrConstColorProcessor.cpp
@@ -16,7 +16,7 @@ public:
GLConstColorProcessor() : fPrevColor(GrColor_ILLEGAL) {}
void emitCode(EmitArgs& args) override {
- GrGLSLFragmentBuilder* fsBuilder = args.fBuilder->getFragmentShaderBuilder();
+ GrGLSLFragmentBuilder* fragBuilder = args.fFragBuilder;
const char* colorUni;
fColorUniform = args.fBuilder->addUniform(GrGLSLProgramBuilder::kFragment_Visibility,
kVec4f_GrSLType, kMedium_GrSLPrecision, "constantColor",
@@ -27,14 +27,14 @@ public:
}
switch (mode) {
case GrConstColorProcessor::kIgnore_InputMode:
- fsBuilder->codeAppendf("%s = %s;", args.fOutputColor, colorUni);
+ fragBuilder->codeAppendf("%s = %s;", args.fOutputColor, colorUni);
break;
case GrConstColorProcessor::kModulateRGBA_InputMode:
- fsBuilder->codeAppendf("%s = %s * %s;", args.fOutputColor, args.fInputColor,
+ fragBuilder->codeAppendf("%s = %s * %s;", args.fOutputColor, args.fInputColor,
colorUni);
break;
case GrConstColorProcessor::kModulateA_InputMode:
- fsBuilder->codeAppendf("%s = %s.a * %s;", args.fOutputColor, args.fInputColor,
+ fragBuilder->codeAppendf("%s = %s.a * %s;", args.fOutputColor, args.fInputColor,
colorUni);
break;
}
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698