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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 258 } |
259 if (random->nextBool()) { | 259 if (random->nextBool()) { |
260 flags |= GrDefaultGeoProcFactory::kCoverage_GPType; | 260 flags |= GrDefaultGeoProcFactory::kCoverage_GPType; |
261 } | 261 } |
262 if (random->nextBool()) { | 262 if (random->nextBool()) { |
263 flags |= GrDefaultGeoProcFactory::kLocalCoord_GPType; | 263 flags |= GrDefaultGeoProcFactory::kLocalCoord_GPType; |
264 } | 264 } |
265 | 265 |
266 return DefaultGeoProc::Create(flags, | 266 return DefaultGeoProc::Create(flags, |
267 GrRandomColor(random), | 267 GrRandomColor(random), |
268 GrProcessorUnitTest::TestMatrix(random), | 268 GrTest::TestMatrix(random), |
269 GrProcessorUnitTest::TestMatrix(random), | 269 GrTest::TestMatrix(random), |
270 random->nextBool(), | 270 random->nextBool(), |
271 GrRandomCoverage(random)); | 271 GrRandomCoverage(random)); |
272 } | 272 } |
273 | 273 |
274 const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags, | 274 const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags, |
275 GrColor color, | 275 GrColor color, |
276 const SkMatrix& viewM
atrix, | 276 const SkMatrix& viewM
atrix, |
277 const SkMatrix& local
Matrix, | 277 const SkMatrix& local
Matrix, |
278 bool opaqueVertexColo
rs, | 278 bool opaqueVertexColo
rs, |
279 uint8_t coverage) { | 279 uint8_t coverage) { |
280 return DefaultGeoProc::Create(gpTypeFlags, | 280 return DefaultGeoProc::Create(gpTypeFlags, |
281 color, | 281 color, |
282 viewMatrix, | 282 viewMatrix, |
283 localMatrix, | 283 localMatrix, |
284 opaqueVertexColors, | 284 opaqueVertexColors, |
285 coverage); | 285 coverage); |
286 } | 286 } |
OLD | NEW |