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, kHigh_GrSLPrecision)); |
joshualitt
2015/05/20 20:36:10
newline
Stephen White
2015/05/20 20:47:43
Done.
| |
197 if (hasColor) { | 197 if (hasColor) { |
198 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer texAttribType)); | 198 fInColor = &this->addVertexAttrib(Attribute("inColor", kVec4ub_GrVer texAttribType)); |
199 } | 199 } |
200 if (hasLocalCoord) { | 200 if (hasLocalCoord) { |
201 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord", | 201 fInLocalCoords = &this->addVertexAttrib(Attribute("inLocalCoord", |
202 kVec2f_GrVertexAtt ribType)); | 202 kVec2f_GrVertexAtt ribType)); |
203 this->setHasLocalCoords(); | 203 this->setHasLocalCoords(); |
204 } | 204 } |
205 if (hasCoverage) { | 205 if (hasCoverage) { |
206 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage", | 206 fInCoverage = &this->addVertexAttrib(Attribute("inCoverage", |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
259 const SkMatrix& local Matrix, | 259 const SkMatrix& local Matrix, |
260 uint8_t coverage) { | 260 uint8_t coverage) { |
261 return DefaultGeoProc::Create(gpTypeFlags, | 261 return DefaultGeoProc::Create(gpTypeFlags, |
262 color, | 262 color, |
263 viewMatrix, | 263 viewMatrix, |
264 localMatrix, | 264 localMatrix, |
265 usesLocalCoords, | 265 usesLocalCoords, |
266 coverageIgnored, | 266 coverageIgnored, |
267 coverage); | 267 coverage); |
268 } | 268 } |
OLD | NEW |