aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPrimitiveProcessor.h
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-09-25 09:52:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-27 14:04:17 +0000
commitfa7ee2447e6227e7f441d32e570489130c0932bb (patch)
tree16bba14539e43cf1b729a2d5a575f34c9c1d1dfc /src/gpu/GrPrimitiveProcessor.h
parenta78f1bc1d4055b82c8d31861f80cafdcc17f3d1f (diff)
changed vertex attribute precisions to be actual types
Bug: skia: Change-Id: Ic5555d9f1be7f24655bdea9f2a3677bfb128ef70 Reviewed-on: https://skia-review.googlesource.com/50221 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/GrPrimitiveProcessor.h')
-rw-r--r--src/gpu/GrPrimitiveProcessor.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 3b90689aca..eb59d98b15 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -49,7 +49,6 @@ public:
const char* fName;
GrVertexAttribType fType;
int fOffsetInRecord;
- GrSLPrecision fPrecision;
InputRate fInputRate;
};
@@ -118,19 +117,13 @@ protected:
/**
* Subclasses call these from their constructor to register vertex and instance attributes.
*/
- const Attribute& addVertexAttrib(const char* name, GrVertexAttribType type,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
- precision = (kDefault_GrSLPrecision == precision) ? kMedium_GrSLPrecision : precision;
- fAttribs.push_back() = {name, type, fVertexStride, precision,
- Attribute::InputRate::kPerVertex};
+ const Attribute& addVertexAttrib(const char* name, GrVertexAttribType type) {
+ fAttribs.push_back() = {name, type, fVertexStride, Attribute::InputRate::kPerVertex};
fVertexStride += static_cast<int>(SkAlign4(GrVertexAttribTypeSize(type)));
return fAttribs.back();
}
- const Attribute& addInstanceAttrib(const char* name, GrVertexAttribType type,
- GrSLPrecision precision = kDefault_GrSLPrecision) {
- precision = (kDefault_GrSLPrecision == precision) ? kMedium_GrSLPrecision : precision;
- fAttribs.push_back() = {name, type, fInstanceStride, precision,
- Attribute::InputRate::kPerInstance};
+ const Attribute& addInstanceAttrib(const char* name, GrVertexAttribType type) {
+ fAttribs.push_back() = {name, type, fInstanceStride, Attribute::InputRate::kPerInstance};
fInstanceStride += static_cast<int>(SkAlign4(GrVertexAttribTypeSize(type)));
return fAttribs.back();
}