diff options
author | robertphillips <robertphillips@google.com> | 2015-01-18 08:14:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-18 08:14:14 -0800 |
commit | 46d36f0e7b709a077c647841eee23bd3efdc4117 (patch) | |
tree | f1af8cebc0e3fbaa0eabc29cfbd781eedffee287 /include/gpu | |
parent | 75d98fd6f23fc73aad3ce87d6c4b6c41c2d1536e (diff) |
Refactor position computation to enable device space "nudge"
To match raster's handling of BW geometry we want to be able to perform a device space "nudge" on all geometry. This CL sets us up to be able to do that in GrGLVertexBuilder::transformToNormalizedDeviceSpace.
BUG=423834
TBR=bsalomon@google.com
Review URL: https://codereview.chromium.org/854013002
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrShaderVar.h | 52 |
1 files changed, 7 insertions, 45 deletions
diff --git a/include/gpu/GrShaderVar.h b/include/gpu/GrShaderVar.h index 53d0c0f201..68ce34b8ef 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; |