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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 1453623003: Move glsl onto EmitArgs struct for emitCode (Closed) Base URL: https://skia.googlesource.com/skia.git@moveShaders
Patch Set: nit 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/GrTextureDomain.cpp ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index c9706f61d6a8e0d893cc75cea1c9633ba503cdb1..22834053f0d64b68fe9b1ad0bbebb679a6df8bbf 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -261,6 +261,7 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrFragmentProcessor& fp,
GrGLSLFragmentProcessor::EmitArgs args(this,
&fFS,
+ this->glslCaps(),
fp,
outColor,
inColor,
@@ -285,8 +286,16 @@ void GrGLProgramBuilder::emitAndInstallProc(const GrPrimitiveProcessor& gp,
SkSTArray<4, GrGLSLTextureSampler> samplers(gp.numTextures());
this->emitSamplers(gp, &samplers, fGeometryProcessor);
- GrGLSLGeometryProcessor::EmitArgs args(this, &fVS, &fFS, gp, outColor, outCoverage, samplers,
- fCoordTransforms, &fOutCoords);
+ GrGLSLGeometryProcessor::EmitArgs args(this,
+ &fVS,
+ &fFS,
+ this->glslCaps(),
+ gp,
+ outColor,
+ outCoverage,
+ samplers,
+ fCoordTransforms,
+ &fOutCoords);
fGeometryProcessor->fGLProc->emitCode(args);
// We have to check that effects and the code they emit are consistent, ie if an effect
@@ -321,9 +330,14 @@ void GrGLProgramBuilder::emitAndInstallXferProc(const GrXferProcessor& xp,
SkSTArray<4, GrGLSLTextureSampler> samplers(xp.numTextures());
this->emitSamplers(xp, &samplers, fXferProcessor);
- GrGLSLXferProcessor::EmitArgs args(this, &fFS, xp, colorIn.c_str(), coverageIn.c_str(),
+ GrGLSLXferProcessor::EmitArgs args(this,
+ &fFS,
+ this->glslCaps(),
+ xp, colorIn.c_str(),
+ coverageIn.c_str(),
fFS.getPrimaryColorOutputName(),
- fFS.getSecondaryColorOutputName(), samplers);
+ fFS.getSecondaryColorOutputName(),
+ samplers);
fXferProcessor->fGLProc->emitCode(args);
// We have to check that effects and the code they emit are consistent, ie if an effect
« no previous file with comments | « src/gpu/effects/GrTextureDomain.cpp ('k') | src/gpu/glsl/GrGLSLFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698