| Index: src/gpu/glsl/GrGLSLShaderBuilder.h
|
| diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h
|
| index 6f8bf68bab5a6f25b067b8f048c40f128a5570e8..c14df5391507a34cb6ea462d07877e658e056480 100644
|
| --- a/src/gpu/glsl/GrGLSLShaderBuilder.h
|
| +++ b/src/gpu/glsl/GrGLSLShaderBuilder.h
|
| @@ -34,7 +34,7 @@ public:
|
| const char* coordName,
|
| GrSLType coordType = kVec2f_GrSLType) const;
|
|
|
| - /** Version of above that appends the result to the fragment shader code instead.*/
|
| + /** Version of above that appends the result to the shader code instead.*/
|
| void appendTextureLookup(const GrGLSLSampler&,
|
| const char* coordName,
|
| GrSLType coordType = kVec2f_GrSLType);
|
| @@ -49,6 +49,14 @@ public:
|
| const char* coordName,
|
| GrSLType coordType = kVec2f_GrSLType);
|
|
|
| + /** Fetches an unfiltered texel from a sampler at integer coordinates. coordExpr must match the
|
| + dimensionality of the sampler and must be within the sampler's range. coordExpr is emitted
|
| + exactly once, so expressions like "idx++" are acceptable. */
|
| + void appendTexelFetch(SkString* out, const GrGLSLSampler&, const char* coordExpr) const;
|
| +
|
| + /** Version of above that appends the result to the shader code instead.*/
|
| + void appendTexelFetch(const GrGLSLSampler&, const char* coordExpr);
|
| +
|
| /**
|
| * Adds a #define directive to the top of the shader.
|
| */
|
| @@ -175,6 +183,12 @@ protected:
|
|
|
| void compileAndAppendLayoutQualifiers();
|
|
|
| + /* Appends any swizzling we may need to get from some backend internal format to the format used
|
| + * in GrPixelConfig. If this is implemented by the GrGpu object, then swizzle will be rgba. For
|
| + * shader prettiness we omit the swizzle rather than appending ".rgba".
|
| + */
|
| + void appendTextureSwizzle(SkString* out, GrPixelConfig) const;
|
| +
|
| void nextStage() {
|
| fShaderStrings.push_back();
|
| fCompilerStrings.push_back(this->code().c_str());
|
|
|