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

Unified Diff: include/gpu/GrShaderVar.h

Issue 854013002: Refactor position computation to enable device space "nudge" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 5 years, 11 months 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
Index: include/gpu/GrShaderVar.h
diff --git a/include/gpu/GrShaderVar.h b/include/gpu/GrShaderVar.h
index 53d0c0f2016dcb937d4d4d951c0e9a7e17c9803e..68ce34b8ef8d0520dee17d577711597eb5d740c4 100644
--- a/include/gpu/GrShaderVar.h
+++ b/include/gpu/GrShaderVar.h
@@ -67,7 +67,7 @@ public:
}
GrShaderVar(const char* name, GrSLType type, TypeModifier typeModifier,
- int arrayCount = kNonArray, GrSLPrecision precision = kDefault_GrSLPrecision)
+ int arrayCount = kNonArray, GrSLPrecision precision = kDefault_GrSLPrecision)
: fType(type)
, fTypeModifier(typeModifier)
, fName(name)
@@ -85,46 +85,11 @@ public:
kUnsizedArray = -1, // an unsized array (declared with [])
};
- /**
- * Sets as a non-array.
- */
- void set(GrSLType type,
- TypeModifier typeModifier,
- const SkString& name,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
- SkASSERT(kVoid_GrSLType != type);
- SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
- fType = type;
- fTypeModifier = typeModifier;
- fName = name;
- fCount = kNonArray;
- fPrecision = precision;
- }
-
- /**
- * Sets as a non-array.
- */
void set(GrSLType type,
- TypeModifier typeModifier,
- const char* name,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
- SkASSERT(kVoid_GrSLType != type);
- SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
- fType = type;
- fTypeModifier = typeModifier;
- fName = name;
- fCount = kNonArray;
- fPrecision = precision;
- }
-
- /**
- * Set all var options
- */
- void set(GrSLType type,
- TypeModifier typeModifier,
const SkString& name,
- int count,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
+ TypeModifier typeModifier = kNone_TypeModifier,
+ GrSLPrecision precision = kDefault_GrSLPrecision,
+ int count = kNonArray) {
SkASSERT(kVoid_GrSLType != type);
SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
fType = type;
@@ -134,14 +99,11 @@ public:
fPrecision = precision;
}
- /**
- * Set all var options
- */
void set(GrSLType type,
- TypeModifier typeModifier,
const char* name,
- int count,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
+ TypeModifier typeModifier = kNone_TypeModifier,
+ GrSLPrecision precision = kDefault_GrSLPrecision,
+ int count = kNonArray) {
SkASSERT(kVoid_GrSLType != type);
SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
fType = type;

Powered by Google App Engine
This is Rietveld 408576698