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

Unified Diff: include/gpu/GrShaderVar.h

Issue 788733003: Make addUniform take a precision (Closed) Base URL: https://skia.googlesource.com/skia.git@move_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 | « no previous file | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrShaderVar.h
diff --git a/include/gpu/GrShaderVar.h b/include/gpu/GrShaderVar.h
index 3ef24b07b69c960cdccade67e32ab3f7adbc98f1..53d0c0f2016dcb937d4d4d951c0e9a7e17c9803e 100644
--- a/include/gpu/GrShaderVar.h
+++ b/include/gpu/GrShaderVar.h
@@ -51,6 +51,7 @@ public:
, fName(name)
, fCount(arrayCount)
, fPrecision(precision) {
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
SkASSERT(kVoid_GrSLType != type);
}
@@ -61,6 +62,7 @@ public:
, fName(name)
, fCount(arrayCount)
, fPrecision(precision) {
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
SkASSERT(kVoid_GrSLType != type);
}
@@ -71,6 +73,7 @@ public:
, fName(name)
, fCount(arrayCount)
, fPrecision(precision) {
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
SkASSERT(kVoid_GrSLType != type);
}
@@ -90,6 +93,7 @@ public:
const SkString& name,
GrSLPrecision precision = kDefault_GrSLPrecision) {
SkASSERT(kVoid_GrSLType != type);
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
fType = type;
fTypeModifier = typeModifier;
fName = name;
@@ -105,6 +109,7 @@ public:
const char* name,
GrSLPrecision precision = kDefault_GrSLPrecision) {
SkASSERT(kVoid_GrSLType != type);
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
fType = type;
fTypeModifier = typeModifier;
fName = name;
@@ -121,6 +126,7 @@ public:
int count,
GrSLPrecision precision = kDefault_GrSLPrecision) {
SkASSERT(kVoid_GrSLType != type);
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
fType = type;
fTypeModifier = typeModifier;
fName = name;
@@ -137,6 +143,7 @@ public:
int count,
GrSLPrecision precision = kDefault_GrSLPrecision) {
SkASSERT(kVoid_GrSLType != type);
+ SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
fType = type;
fTypeModifier = typeModifier;
fName = name;
« no previous file with comments | « no previous file | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698