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

Unified Diff: src/gpu/effects/GrDistanceFieldGeoProc.cpp

Issue 1145273002: Use high precision vertex attributes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change other inPosition * fViewMatrix users to highp Created 5 years, 7 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: src/gpu/effects/GrDistanceFieldGeoProc.cpp
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 1e454a00010b8856ffbf17e009923551e33bf35a..ea3a580b6a6af4b29cb15b64231e1ea0f8ace247 100755
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -205,7 +205,7 @@ GrDistanceFieldA8TextGeoProc::GrDistanceFieldA8TextGeoProc(GrColor color,
, fUsesLocalCoords(usesLocalCoords) {
SkASSERT(!(flags & ~kNonLCD_DistanceFieldEffectMask));
this->initClassID<GrDistanceFieldA8TextGeoProc>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType));
+ fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType, kHigh_GrSLPrecision));
joshualitt 2015/05/20 20:36:11 newline
Stephen White 2015/05/20 20:47:43 Done.
if (flags & kColorAttr_DistanceFieldEffectFlag) {
fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexAttribType));
}
@@ -420,7 +420,7 @@ GrDistanceFieldPathGeoProc::GrDistanceFieldPathGeoProc(
, fUsesLocalCoords(usesLocalCoords) {
SkASSERT(!(flags & ~kNonLCD_DistanceFieldEffectMask));
this->initClassID<GrDistanceFieldPathGeoProc>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType));
+ fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType, kHigh_GrSLPrecision));
joshualitt 2015/05/20 20:36:11 newline
Stephen White 2015/05/20 20:47:43 Done.
if (flags & kColorAttr_DistanceFieldEffectFlag) {
fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVertexAttribType));
}
@@ -674,7 +674,7 @@ GrDistanceFieldLCDTextGeoProc::GrDistanceFieldLCDTextGeoProc(
, fUsesLocalCoords(usesLocalCoords) {
SkASSERT(!(flags & ~kLCD_DistanceFieldEffectMask) && (flags & kUseLCD_DistanceFieldEffectFlag));
this->initClassID<GrDistanceFieldLCDTextGeoProc>();
- fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType));
+ fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertexAttribType, kHigh_GrSLPrecision));
joshualitt 2015/05/20 20:36:11 newline
Stephen White 2015/05/20 20:47:43 Done.
fInTextureCoords = &this->addVertexAttrib(Attribute("inTextureCoords",
kVec2s_GrVertexAttribType));
this->addTextureAccess(&fTextureAccess);

Powered by Google App Engine
This is Rietveld 408576698