Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: src/gpu/GrBatchTest.cpp

Issue 1285593002: Wire up testcreate function for GrDrawAtlasBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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); 14 BATCH_TEST_EXTERN(AAConvexPathBatch);
15 BATCH_TEST_EXTERN(AADistanceFieldPathBatch); 15 BATCH_TEST_EXTERN(AADistanceFieldPathBatch);
16 BATCH_TEST_EXTERN(AAFillRectBatch); 16 BATCH_TEST_EXTERN(AAFillRectBatch);
17 BATCH_TEST_EXTERN(AAHairlineBatch); 17 BATCH_TEST_EXTERN(AAHairlineBatch);
18 BATCH_TEST_EXTERN(AAStrokeRectBatch); 18 BATCH_TEST_EXTERN(AAStrokeRectBatch);
19 BATCH_TEST_EXTERN(DashBatch); 19 BATCH_TEST_EXTERN(DashBatch);
20 BATCH_TEST_EXTERN(DefaultPathBatch); 20 BATCH_TEST_EXTERN(DefaultPathBatch);
21 BATCH_TEST_EXTERN(CircleBatch); 21 BATCH_TEST_EXTERN(CircleBatch);
22 BATCH_TEST_EXTERN(DIEllipseBatch); 22 BATCH_TEST_EXTERN(DIEllipseBatch);
23 BATCH_TEST_EXTERN(EllipseBatch); 23 BATCH_TEST_EXTERN(EllipseBatch);
24 BATCH_TEST_EXTERN(GrDrawAtlasBatch);
24 BATCH_TEST_EXTERN(GrStrokeRectBatch); 25 BATCH_TEST_EXTERN(GrStrokeRectBatch);
25 BATCH_TEST_EXTERN(RRectBatch); 26 BATCH_TEST_EXTERN(RRectBatch);
26 BATCH_TEST_EXTERN(TesselatingPathBatch); 27 BATCH_TEST_EXTERN(TesselatingPathBatch);
27 BATCH_TEST_EXTERN(TextBlobBatch); 28 BATCH_TEST_EXTERN(TextBlobBatch);
28 BATCH_TEST_EXTERN(VerticesBatch); 29 BATCH_TEST_EXTERN(VerticesBatch);
29 30
30 static BatchTestFunc gTestBatches[] = { 31 static BatchTestFunc gTestBatches[] = {
31 BATCH_TEST_ENTRY(AAConvexPathBatch), 32 BATCH_TEST_ENTRY(AAConvexPathBatch),
32 BATCH_TEST_ENTRY(AADistanceFieldPathBatch), 33 BATCH_TEST_ENTRY(AADistanceFieldPathBatch),
33 BATCH_TEST_ENTRY(AAFillRectBatch), 34 BATCH_TEST_ENTRY(AAFillRectBatch),
34 BATCH_TEST_ENTRY(AAHairlineBatch), 35 BATCH_TEST_ENTRY(AAHairlineBatch),
35 BATCH_TEST_ENTRY(AAStrokeRectBatch), 36 BATCH_TEST_ENTRY(AAStrokeRectBatch),
36 BATCH_TEST_ENTRY(DashBatch), 37 BATCH_TEST_ENTRY(DashBatch),
37 BATCH_TEST_ENTRY(DefaultPathBatch), 38 BATCH_TEST_ENTRY(DefaultPathBatch),
38 BATCH_TEST_ENTRY(CircleBatch), 39 BATCH_TEST_ENTRY(CircleBatch),
39 BATCH_TEST_ENTRY(DIEllipseBatch), 40 BATCH_TEST_ENTRY(DIEllipseBatch),
40 BATCH_TEST_ENTRY(EllipseBatch), 41 BATCH_TEST_ENTRY(EllipseBatch),
42 BATCH_TEST_ENTRY(GrDrawAtlasBatch),
41 BATCH_TEST_ENTRY(GrStrokeRectBatch), 43 BATCH_TEST_ENTRY(GrStrokeRectBatch),
42 BATCH_TEST_ENTRY(RRectBatch), 44 BATCH_TEST_ENTRY(RRectBatch),
43 BATCH_TEST_ENTRY(TesselatingPathBatch), 45 BATCH_TEST_ENTRY(TesselatingPathBatch),
44 BATCH_TEST_ENTRY(TextBlobBatch), 46 BATCH_TEST_ENTRY(TextBlobBatch),
45 BATCH_TEST_ENTRY(VerticesBatch) 47 BATCH_TEST_ENTRY(VerticesBatch)
46 }; 48 };
47 49
48 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { 50 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) {
49 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches))); 51 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches)));
50 BatchTestFunc func = gTestBatches[index]; 52 BatchTestFunc func = gTestBatches[index];
51 return (*func)(random, context); 53 return (*func)(random, context);
52 } 54 }
53 #endif 55 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrDrawAtlasBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698