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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 bool fLocalCoordsWillBeRead; | 244 bool fLocalCoordsWillBeRead; |
245 bool fCoverageWillBeIgnored; | 245 bool fCoverageWillBeIgnored; |
246 | 246 |
247 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 247 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
248 | 248 |
249 typedef GrGeometryProcessor INHERITED; | 249 typedef GrGeometryProcessor INHERITED; |
250 }; | 250 }; |
251 | 251 |
252 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DefaultGeoProc); | 252 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(DefaultGeoProc); |
253 | 253 |
254 const GrGeometryProcessor* DefaultGeoProc::TestCreate(GrProcessorTestData* d) { | 254 GrGeometryProcessor* DefaultGeoProc::TestCreate(GrProcessorTestData* d) { |
255 uint32_t flags = 0; | 255 uint32_t flags = 0; |
256 if (d->fRandom->nextBool()) { | 256 if (d->fRandom->nextBool()) { |
257 flags |= kColor_GPFlag; | 257 flags |= kColor_GPFlag; |
258 } | 258 } |
259 if (d->fRandom->nextBool()) { | 259 if (d->fRandom->nextBool()) { |
260 flags |= kCoverage_GPFlag; | 260 flags |= kCoverage_GPFlag; |
261 } | 261 } |
262 if (d->fRandom->nextBool()) { | 262 if (d->fRandom->nextBool()) { |
263 flags |= kLocalCoord_GPFlag; | 263 flags |= kLocalCoord_GPFlag; |
264 } | 264 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 } | 314 } |
315 | 315 |
316 if (localCoords.hasLocalMatrix()) { | 316 if (localCoords.hasLocalMatrix()) { |
317 invert.preConcat(*localCoords.fMatrix); | 317 invert.preConcat(*localCoords.fMatrix); |
318 } | 318 } |
319 } | 319 } |
320 | 320 |
321 LocalCoords inverted(LocalCoords::kUsePosition_Type, &invert); | 321 LocalCoords inverted(LocalCoords::kUsePosition_Type, &invert); |
322 return Create(color, coverage, inverted, SkMatrix::I()); | 322 return Create(color, coverage, inverted, SkMatrix::I()); |
323 } | 323 } |
OLD | NEW |