| Index: src/gpu/gl/GrGLSL.cpp
|
| diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp
|
| index d388d9120a1d3fc43891ba47a50f2f4221ddb432..f4caf5201292ffbe837129d077fccbbc1d0586b1 100644
|
| --- a/src/gpu/gl/GrGLSL.cpp
|
| +++ b/src/gpu/gl/GrGLSL.cpp
|
| @@ -91,6 +91,25 @@ const char* GrGetGLSLVersionDecl(const GrGLContextInfo& info) {
|
| }
|
| }
|
|
|
| +void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p, GrGLStandard s, SkString* out) {
|
| + // Desktop GLSL has added precision qualifiers but they don't do anything.
|
| + if (kGLES_GrGLStandard == s) {
|
| + switch (p) {
|
| + case kHigh_GrSLPrecision:
|
| + out->append("precision highp float;\n");
|
| + break;
|
| + case kMedium_GrSLPrecision:
|
| + out->append("precision mediump float;\n");
|
| + break;
|
| + case kLow_GrSLPrecision:
|
| + out->append("precision lowp float;\n");
|
| + break;
|
| + default:
|
| + SkFAIL("Unknown precision value.");
|
| + }
|
| + }
|
| +}
|
| +
|
| void GrGLSLMulVarBy4f(SkString* outAppend, const char* vec4VarName, const GrGLSLExpr4& mulFactor) {
|
| if (mulFactor.isOnes()) {
|
| *outAppend = SkString();
|
|
|