| Index: src/gpu/glsl/GrGLSL.h
|
| diff --git a/src/gpu/glsl/GrGLSL.h b/src/gpu/glsl/GrGLSL.h
|
| index 12c1f1fcc6b375e35a677757f28adf76d0a4662a..9f5f2b05b4178744087a1bb51d3a161d2c7889be 100644
|
| --- a/src/gpu/glsl/GrGLSL.h
|
| +++ b/src/gpu/glsl/GrGLSL.h
|
| @@ -84,6 +84,23 @@ void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision,
|
| SkString* out);
|
|
|
| /**
|
| + * Converts a GrSLPrecision to its corresponding GLSL precision qualifier.
|
| + */
|
| +static inline const char* GrGLSLPrecisionString(GrSLPrecision p) {
|
| + switch (p) {
|
| + case kLow_GrSLPrecision:
|
| + return "lowp";
|
| + case kMedium_GrSLPrecision:
|
| + return "mediump";
|
| + case kHigh_GrSLPrecision:
|
| + return "highp";
|
| + default:
|
| + SkFAIL("Unexpected precision type.");
|
| + return "";
|
| + }
|
| +}
|
| +
|
| +/**
|
| * Converts a GrSLType to a string containing the name of the equivalent GLSL type.
|
| */
|
| static inline const char* GrGLSLTypeString(GrSLType t) {
|
|
|