OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2015 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #include "GrBatchTest.h" |
| 9 #include "SkRandom.h" |
| 10 #include "SkTypes.h" |
| 11 |
| 12 #ifdef GR_TEST_UTILS |
| 13 |
| 14 BATCH_TEST_EXTERN(AAFillRectBatch); |
| 15 BATCH_TEST_EXTERN(AAStrokeRectBatch); |
| 16 |
| 17 static BatchTestFunc gTestBatches[] = { |
| 18 BATCH_TEST_ENTRY(AAFillRectBatch), |
| 19 BATCH_TEST_ENTRY(AAStrokeRectBatch), |
| 20 }; |
| 21 |
| 22 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { |
| 23 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(
gTestBatches))); |
| 24 BatchTestFunc func = gTestBatches[index]; |
| 25 return (*func)(random, context); |
| 26 } |
| 27 #endif |
OLD | NEW |