Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2407)

Unified Diff: src/gpu/gl/GrGLShaderVar.h

Issue 777443003: Move shader precision out of GrShaderVar (Closed) Base URL: https://skia.googlesource.com/skia.git@prec
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLShaderVar.h
diff --git a/src/gpu/gl/GrGLShaderVar.h b/src/gpu/gl/GrGLShaderVar.h
index 7705c30db0c9787a12f52777859371c79012d88c..5d4d70025e552ce423a4ca8da00fc938a56bb3db 100644
--- a/src/gpu/gl/GrGLShaderVar.h
+++ b/src/gpu/gl/GrGLShaderVar.h
@@ -37,7 +37,7 @@ public:
}
GrGLShaderVar(const char* name, GrSLType type, int arrayCount = kNonArray,
- Precision precision = kDefault_Precision)
+ GrSLPrecision precision = kDefault_GrSLPrecision)
: GrShaderVar(name, type, arrayCount, precision)
, fOrigin(kDefault_Origin)
, fUseUniformFloatArrays(USE_UNIFORM_FLOAT_ARRAYS) {
@@ -47,7 +47,7 @@ public:
}
GrGLShaderVar(const char* name, GrSLType type, TypeModifier typeModifier,
- int arrayCount = kNonArray, Precision precision = kDefault_Precision)
+ int arrayCount = kNonArray, GrSLPrecision precision = kDefault_GrSLPrecision)
: GrShaderVar(name, type, typeModifier, arrayCount, precision)
, fOrigin(kDefault_Origin)
, fUseUniformFloatArrays(USE_UNIFORM_FLOAT_ARRAYS) {
@@ -83,7 +83,7 @@ public:
void set(GrSLType type,
TypeModifier typeModifier,
const SkString& name,
- Precision precision = kDefault_Precision,
+ GrSLPrecision precision = kDefault_GrSLPrecision,
Origin origin = kDefault_Origin,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
@@ -98,7 +98,7 @@ public:
void set(GrSLType type,
TypeModifier typeModifier,
const char* name,
- Precision precision = kDefault_Precision,
+ GrSLPrecision precision = kDefault_GrSLPrecision,
Origin origin = kDefault_Origin,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
@@ -114,7 +114,7 @@ public:
TypeModifier typeModifier,
const SkString& name,
int count,
- Precision precision = kDefault_Precision,
+ GrSLPrecision precision = kDefault_GrSLPrecision,
Origin origin = kDefault_Origin,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
@@ -130,7 +130,7 @@ public:
TypeModifier typeModifier,
const char* name,
int count,
- Precision precision = kDefault_Precision,
+ GrSLPrecision precision = kDefault_GrSLPrecision,
Origin origin = kDefault_Origin,
bool useUniformFloatArrays = USE_UNIFORM_FLOAT_ARRAYS) {
SkASSERT(kVoid_GrSLType != type);
@@ -197,15 +197,15 @@ public:
fUseUniformFloatArrays ? "" : ".x");
}
- static const char* PrecisionString(Precision p, GrGLStandard standard) {
+ static const char* PrecisionString(GrSLPrecision p, GrGLStandard standard) {
// Desktop GLSL has added precision qualifiers but they don't do anything.
if (kGLES_GrGLStandard == standard) {
switch (p) {
- case kLow_Precision:
+ case kLow_GrSLPrecision:
return "lowp ";
- case kMedium_Precision:
+ case kMedium_GrSLPrecision:
return "mediump ";
- case kHigh_Precision:
+ case kHigh_GrSLPrecision:
return "highp ";
default:
SkFAIL("Unexpected precision type.");
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698