OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrBatchTest.h" | 8 #include "GrBatchTest.h" |
9 #include "SkRandom.h" | 9 #include "SkRandom.h" |
10 #include "SkTypes.h" | 10 #include "SkTypes.h" |
11 | 11 |
12 #ifdef GR_TEST_UTILS | 12 #ifdef GR_TEST_UTILS |
13 | 13 |
| 14 BATCH_TEST_EXTERN(AAConvexPathBatch); |
| 15 BATCH_TEST_EXTERN(AADistanceFieldPathBatch); |
14 BATCH_TEST_EXTERN(AAFillRectBatch); | 16 BATCH_TEST_EXTERN(AAFillRectBatch); |
| 17 BATCH_TEST_EXTERN(AAHairlineBatch); |
15 BATCH_TEST_EXTERN(AAStrokeRectBatch); | 18 BATCH_TEST_EXTERN(AAStrokeRectBatch); |
16 BATCH_TEST_EXTERN(DashBatch); | 19 BATCH_TEST_EXTERN(DashBatch); |
| 20 BATCH_TEST_EXTERN(DefaultPathBatch); |
17 BATCH_TEST_EXTERN(CircleBatch); | 21 BATCH_TEST_EXTERN(CircleBatch); |
18 BATCH_TEST_EXTERN(DIEllipseBatch); | 22 BATCH_TEST_EXTERN(DIEllipseBatch); |
19 BATCH_TEST_EXTERN(EllipseBatch); | 23 BATCH_TEST_EXTERN(EllipseBatch); |
20 BATCH_TEST_EXTERN(RRectBatch); | 24 BATCH_TEST_EXTERN(RRectBatch); |
| 25 BATCH_TEST_EXTERN(StrokeRectBatch); |
| 26 BATCH_TEST_EXTERN(TesselatingPathBatch); |
| 27 BATCH_TEST_EXTERN(TextBlobBatch); |
| 28 BATCH_TEST_EXTERN(VerticesBatch); |
21 | 29 |
22 static BatchTestFunc gTestBatches[] = { | 30 static BatchTestFunc gTestBatches[] = { |
| 31 BATCH_TEST_ENTRY(AAConvexPathBatch), |
| 32 BATCH_TEST_ENTRY(AADistanceFieldPathBatch), |
23 BATCH_TEST_ENTRY(AAFillRectBatch), | 33 BATCH_TEST_ENTRY(AAFillRectBatch), |
| 34 BATCH_TEST_ENTRY(AAHairlineBatch), |
24 BATCH_TEST_ENTRY(AAStrokeRectBatch), | 35 BATCH_TEST_ENTRY(AAStrokeRectBatch), |
25 BATCH_TEST_ENTRY(DashBatch), | 36 BATCH_TEST_ENTRY(DashBatch), |
| 37 BATCH_TEST_ENTRY(DefaultPathBatch), |
26 BATCH_TEST_ENTRY(CircleBatch), | 38 BATCH_TEST_ENTRY(CircleBatch), |
27 BATCH_TEST_ENTRY(DIEllipseBatch), | 39 BATCH_TEST_ENTRY(DIEllipseBatch), |
28 BATCH_TEST_ENTRY(EllipseBatch), | 40 BATCH_TEST_ENTRY(EllipseBatch), |
29 BATCH_TEST_ENTRY(RRectBatch) | 41 BATCH_TEST_ENTRY(RRectBatch), |
30 | 42 BATCH_TEST_ENTRY(StrokeRectBatch), |
| 43 BATCH_TEST_ENTRY(TesselatingPathBatch), |
| 44 BATCH_TEST_ENTRY(TextBlobBatch), |
| 45 BATCH_TEST_ENTRY(VerticesBatch) |
31 }; | 46 }; |
32 | 47 |
33 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { | 48 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { |
34 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(
gTestBatches))); | 49 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(
gTestBatches))); |
35 BatchTestFunc func = gTestBatches[index]; | 50 BatchTestFunc func = gTestBatches[index]; |
36 return (*func)(random, context); | 51 return (*func)(random, context); |
37 } | 52 } |
38 #endif | 53 #endif |
OLD | NEW |