OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrDefaultGeoProcFactory.h" | 8 #include "GrDefaultGeoProcFactory.h" |
9 | 9 |
10 #include "GrInvariantOutput.h" | 10 #include "GrInvariantOutput.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 , fViewMatrix(viewMatrix) | 186 , fViewMatrix(viewMatrix) |
187 , fLocalMatrix(localMatrix) | 187 , fLocalMatrix(localMatrix) |
188 , fCoverage(coverage) | 188 , fCoverage(coverage) |
189 , fFlags(gpTypeFlags) | 189 , fFlags(gpTypeFlags) |
190 , fUsesLocalCoords(usesLocalCoords) | 190 , fUsesLocalCoords(usesLocalCoords) |
191 , fCoverageIgnored(coverageIgnored) { | 191 , fCoverageIgnored(coverageIgnored) { |
192 this->initClassID<DefaultGeoProc>(); | 192 this->initClassID<DefaultGeoProc>(); |
193 bool hasColor = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kColor_G
PType); | 193 bool hasColor = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kColor_G
PType); |
194 bool hasLocalCoord = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kLo
calCoord_GPType); | 194 bool hasLocalCoord = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kLo
calCoord_GPType); |
195 bool hasCoverage = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kCove
rage_GPType); | 195 bool hasCoverage = SkToBool(gpTypeFlags & GrDefaultGeoProcFactory::kCove
rage_GPType); |
196 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe
rtexAttribType)); | 196 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe
rtexAttribType, |
| 197 kHigh_GrSLPrecision)); |
197 if (hasColor) { | 198 if (hasColor) { |
198 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer
texAttribType)); | 199 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer
texAttribType)); |
199 } | 200 } |
200 if (hasLocalCoord) { | 201 if (hasLocalCoord) { |
201 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord", | 202 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord", |
202 kVec2f_GrVertexAtt
ribType)); | 203 kVec2f_GrVertexAtt
ribType)); |
203 this->setHasLocalCoords(); | 204 this->setHasLocalCoords(); |
204 } | 205 } |
205 if (hasCoverage) { | 206 if (hasCoverage) { |
206 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage", | 207 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage", |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 const SkMatrix& local
Matrix, | 260 const SkMatrix& local
Matrix, |
260 uint8_t coverage) { | 261 uint8_t coverage) { |
261 return DefaultGeoProc::Create(gpTypeFlags, | 262 return DefaultGeoProc::Create(gpTypeFlags, |
262 color, | 263 color, |
263 viewMatrix, | 264 viewMatrix, |
264 localMatrix, | 265 localMatrix, |
265 usesLocalCoords, | 266 usesLocalCoords, |
266 coverageIgnored, | 267 coverageIgnored, |
267 coverage); | 268 coverage); |
268 } | 269 } |
OLD | NEW |