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 BATCH_TEST_EXTERN(AAFillRectBatch); |
| 13 BATCH_TEST_EXTERN(AAStrokeRectBatch); |
| 14 |
| 15 static BatchTestFunc gTestBatches[] = { |
| 16 BATCH_TEST_ENTRY(AAFillRectBatch), |
| 17 BATCH_TEST_ENTRY(AAStrokeRectBatch), |
| 18 }; |
| 19 |
| 20 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { |
| 21 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT(
gTestBatches))); |
| 22 BatchTestFunc func = gTestBatches[index]; |
| 23 return (*func)(random, context); |
| 24 } |
OLD | NEW |