aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLProgramBuilder.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-05-02 15:37:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-02 20:05:56 +0000
commit93f20f5629e52eed732d2b9d6dbbb351cc30b2cd (patch)
tree70ba3a46eb5d55fb05cc24a790b883684143f92f /src/gpu/glsl/GrGLSLProgramBuilder.h
parent37f16551f45919a1a039f081b5c8ea275e58427d (diff)
eliminated GrGLSLExpr
Now that skslc performs all of the optimizations (and then some) that GrGLSLExpr is responsible for, it's just extra work for no benefit. Bug: skia: Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a Reviewed-on: https://skia-review.googlesource.com/14560 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLProgramBuilder.h')
-rw-r--r--src/gpu/glsl/GrGLSLProgramBuilder.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index 147eb98c98..4b1957eb2a 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;
@@ -110,7 +110,7 @@ protected:
void addFeature(GrShaderFlags shaders, uint32_t featureBit, const char* extensionName);
- bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage);
+ bool emitAndInstallProcs();
void cleanupFragmentProcessors();
@@ -140,19 +140,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<SamplerHandle>* outBufferSamplerHandles,