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

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

Issue 1290763002: Add GrAARectBatch which can handle a local matrix (Closed) Base URL: https://skia.googlesource.com/skia.git@explicitlocalcoordsbatch
Patch Set: rebase 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/GrAAFillRectBatch.h » ('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(AAFillRectBatchLocalMatrix);
17 BATCH_TEST_EXTERN(AAHairlineBatch); 18 BATCH_TEST_EXTERN(AAHairlineBatch);
18 BATCH_TEST_EXTERN(AAStrokeRectBatch); 19 BATCH_TEST_EXTERN(AAStrokeRectBatch);
19 BATCH_TEST_EXTERN(DashBatch); 20 BATCH_TEST_EXTERN(DashBatch);
20 BATCH_TEST_EXTERN(DefaultPathBatch); 21 BATCH_TEST_EXTERN(DefaultPathBatch);
21 BATCH_TEST_EXTERN(CircleBatch); 22 BATCH_TEST_EXTERN(CircleBatch);
22 BATCH_TEST_EXTERN(DIEllipseBatch); 23 BATCH_TEST_EXTERN(DIEllipseBatch);
23 BATCH_TEST_EXTERN(EllipseBatch); 24 BATCH_TEST_EXTERN(EllipseBatch);
24 BATCH_TEST_EXTERN(GrDrawAtlasBatch); 25 BATCH_TEST_EXTERN(GrDrawAtlasBatch);
25 BATCH_TEST_EXTERN(GrStrokeRectBatch); 26 BATCH_TEST_EXTERN(GrStrokeRectBatch);
26 BATCH_TEST_EXTERN(RRectBatch); 27 BATCH_TEST_EXTERN(RRectBatch);
27 BATCH_TEST_EXTERN(TesselatingPathBatch); 28 BATCH_TEST_EXTERN(TesselatingPathBatch);
28 BATCH_TEST_EXTERN(TextBlobBatch); 29 BATCH_TEST_EXTERN(TextBlobBatch);
29 BATCH_TEST_EXTERN(VerticesBatch); 30 BATCH_TEST_EXTERN(VerticesBatch);
30 31
31 static BatchTestFunc gTestBatches[] = { 32 static BatchTestFunc gTestBatches[] = {
32 BATCH_TEST_ENTRY(AAConvexPathBatch), 33 BATCH_TEST_ENTRY(AAConvexPathBatch),
33 BATCH_TEST_ENTRY(AADistanceFieldPathBatch), 34 BATCH_TEST_ENTRY(AADistanceFieldPathBatch),
34 BATCH_TEST_ENTRY(AAFillRectBatch), 35 BATCH_TEST_ENTRY(AAFillRectBatch),
36 BATCH_TEST_ENTRY(AAFillRectBatchLocalMatrix),
35 BATCH_TEST_ENTRY(AAHairlineBatch), 37 BATCH_TEST_ENTRY(AAHairlineBatch),
36 BATCH_TEST_ENTRY(AAStrokeRectBatch), 38 BATCH_TEST_ENTRY(AAStrokeRectBatch),
37 BATCH_TEST_ENTRY(DashBatch), 39 BATCH_TEST_ENTRY(DashBatch),
38 BATCH_TEST_ENTRY(DefaultPathBatch), 40 BATCH_TEST_ENTRY(DefaultPathBatch),
39 BATCH_TEST_ENTRY(CircleBatch), 41 BATCH_TEST_ENTRY(CircleBatch),
40 BATCH_TEST_ENTRY(DIEllipseBatch), 42 BATCH_TEST_ENTRY(DIEllipseBatch),
41 BATCH_TEST_ENTRY(EllipseBatch), 43 BATCH_TEST_ENTRY(EllipseBatch),
42 BATCH_TEST_ENTRY(GrDrawAtlasBatch), 44 BATCH_TEST_ENTRY(GrDrawAtlasBatch),
43 BATCH_TEST_ENTRY(GrStrokeRectBatch), 45 BATCH_TEST_ENTRY(GrStrokeRectBatch),
44 BATCH_TEST_ENTRY(RRectBatch), 46 BATCH_TEST_ENTRY(RRectBatch),
45 BATCH_TEST_ENTRY(TesselatingPathBatch), 47 BATCH_TEST_ENTRY(TesselatingPathBatch),
46 BATCH_TEST_ENTRY(TextBlobBatch), 48 BATCH_TEST_ENTRY(TextBlobBatch),
47 BATCH_TEST_ENTRY(VerticesBatch) 49 BATCH_TEST_ENTRY(VerticesBatch)
48 }; 50 };
49 51
50 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { 52 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) {
51 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches))); 53 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches)));
52 BatchTestFunc func = gTestBatches[index]; 54 BatchTestFunc func = gTestBatches[index];
53 return (*func)(random, context); 55 return (*func)(random, context);
54 } 56 }
55 #endif 57 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/batches/GrAAFillRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698