diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-05-08 09:36:08 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-08 16:08:44 +0000 |
commit | 2983f4022d756def4f93579ee519cd31c8f24d61 (patch) | |
tree | 60b9bc416882a8b2b2d5826d5e6ad8c59e8c7901 /src/gpu/glsl/GrGLSLProgramBuilder.h | |
parent | 0562eb9c6c98f07732ca96a1dd4e986f1ca089b8 (diff) |
Re-land of "eliminated GrGLSLExpr".
This change is exactly the same as the last time it was landed; I believe the
underlying optimizer bug that was causing this to cause problems has been
fixed by a prior CL.
Bug: skia:
Change-Id: I5436422f094ea758caa3cd69e9338db31b1f93fa
Reviewed-on: https://skia-review.googlesource.com/15768
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLProgramBuilder.h')
-rw-r--r-- | src/gpu/glsl/GrGLSLProgramBuilder.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h index f12ba5e925..933d422535 100644 --- a/src/gpu/glsl/GrGLSLProgramBuilder.h +++ b/src/gpu/glsl/GrGLSLProgramBuilder.h @@ -22,7 +22,7 @@ class GrShaderVar; class GrGLSLVaryingHandler; -class GrGLSLExpr4; +class SkString; class GrShaderCaps; typedef SkSTArray<8, GrGLSLFragmentProcessor*, true> GrGLSLFragProcs; @@ -115,7 +115,7 @@ protected: void addFeature(GrShaderFlags shaders, uint32_t featureBit, const char* extensionName); - bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage); + bool emitAndInstallProcs(); void cleanupFragmentProcessors(); @@ -145,19 +145,18 @@ private: }; // Generates a possibly mangled name for a stage variable and writes it to the fragment shader. - // If GrGLSLExpr4 has a valid name then it will use that instead - void nameExpression(GrGLSLExpr4*, const char* baseName); + void nameExpression(SkString*, const char* baseName); void emitAndInstallPrimProc(const GrPrimitiveProcessor&, - GrGLSLExpr4* outputColor, - GrGLSLExpr4* outputCoverage); - void emitAndInstallFragProcs(GrGLSLExpr4* colorInOut, GrGLSLExpr4* coverageInOut); - void emitAndInstallFragProc(const GrFragmentProcessor&, - int index, - int transformedCoordVarsIdx, - const GrGLSLExpr4& input, - GrGLSLExpr4* output); - void emitAndInstallXferProc(const GrGLSLExpr4& colorIn, const GrGLSLExpr4& coverageIn); + SkString* outputColor, + SkString* outputCoverage); + void emitAndInstallFragProcs(SkString* colorInOut, SkString* coverageInOut); + SkString emitAndInstallFragProc(const GrFragmentProcessor&, + int index, + int transformedCoordVarsIdx, + const SkString& input, + SkString output); + void emitAndInstallXferProc(const SkString& colorIn, const SkString& coverageIn); void emitSamplersAndImageStorages(const GrResourceIOProcessor& processor, SkTArray<SamplerHandle>* outTexSamplerHandles, SkTArray<TexelBufferHandle>* outTexelBufferHandles, |