Use high precision vertex attributes.
Specifying vertex attributes and the view matrix as mediump causes bad artifacts on Mali T6XX.
Covered by the bigmatrix GM in msaa4 mode.
BUG:skia=3545,3771
Review URL: https://codereview.chromium.org/1145273002
diff --git a/src/gpu/GrPrimitiveProcessor.h b/src/gpu/GrPrimitiveProcessor.h
index 2e25bdb..4147b74 100644
--- a/src/gpu/GrPrimitiveProcessor.h
+++ b/src/gpu/GrPrimitiveProcessor.h
@@ -126,13 +126,16 @@
: fName(NULL)
, fType(kFloat_GrVertexAttribType)
, fOffset(0) {}
- Attribute(const char* name, GrVertexAttribType type)
+ Attribute(const char* name, GrVertexAttribType type,
+ GrSLPrecision precision = kDefault_GrSLPrecision)
: fName(name)
, fType(type)
- , fOffset(SkAlign4(GrVertexAttribTypeSize(type))) {}
+ , fOffset(SkAlign4(GrVertexAttribTypeSize(type)))
+ , fPrecision(precision) {}
const char* fName;
GrVertexAttribType fType;
size_t fOffset;
+ GrSLPrecision fPrecision;
};
int numAttribs() const { return fNumAttribs; }