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

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

Issue 2230513004: Re-adding analytical GeoProc for rectangles (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Addressed patch 2 comments Created 4 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 | « gyp/gpu.gypi ('k') | src/gpu/GrDrawContext.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 DRAW_BATCH_TEST_EXTERN(AAConvexPathBatch); 14 DRAW_BATCH_TEST_EXTERN(AAConvexPathBatch);
15 DRAW_BATCH_TEST_EXTERN(AADistanceFieldPathBatch); 15 DRAW_BATCH_TEST_EXTERN(AADistanceFieldPathBatch);
16 DRAW_BATCH_TEST_EXTERN(AAFillRectBatch); 16 DRAW_BATCH_TEST_EXTERN(AAFillRectBatch);
17 DRAW_BATCH_TEST_EXTERN(AAFillRectBatchLocalMatrix); 17 DRAW_BATCH_TEST_EXTERN(AAFillRectBatchLocalMatrix);
18 DRAW_BATCH_TEST_EXTERN(AAHairlineBatch); 18 DRAW_BATCH_TEST_EXTERN(AAHairlineBatch);
19 DRAW_BATCH_TEST_EXTERN(AAStrokeRectBatch); 19 DRAW_BATCH_TEST_EXTERN(AAStrokeRectBatch);
20 DRAW_BATCH_TEST_EXTERN(AnalyticRectBatch);
20 DRAW_BATCH_TEST_EXTERN(DashBatch); 21 DRAW_BATCH_TEST_EXTERN(DashBatch);
21 DRAW_BATCH_TEST_EXTERN(DefaultPathBatch); 22 DRAW_BATCH_TEST_EXTERN(DefaultPathBatch);
22 DRAW_BATCH_TEST_EXTERN(CircleBatch); 23 DRAW_BATCH_TEST_EXTERN(CircleBatch);
23 DRAW_BATCH_TEST_EXTERN(DIEllipseBatch); 24 DRAW_BATCH_TEST_EXTERN(DIEllipseBatch);
24 DRAW_BATCH_TEST_EXTERN(EllipseBatch); 25 DRAW_BATCH_TEST_EXTERN(EllipseBatch);
25 DRAW_BATCH_TEST_EXTERN(GrDrawAtlasBatch); 26 DRAW_BATCH_TEST_EXTERN(GrDrawAtlasBatch);
26 DRAW_BATCH_TEST_EXTERN(NonAAStrokeRectBatch); 27 DRAW_BATCH_TEST_EXTERN(NonAAStrokeRectBatch);
27 DRAW_BATCH_TEST_EXTERN(RRectBatch); 28 DRAW_BATCH_TEST_EXTERN(RRectBatch);
28 DRAW_BATCH_TEST_EXTERN(TesselatingPathBatch); 29 DRAW_BATCH_TEST_EXTERN(TesselatingPathBatch);
29 DRAW_BATCH_TEST_EXTERN(TextBlobBatch); 30 DRAW_BATCH_TEST_EXTERN(TextBlobBatch);
30 DRAW_BATCH_TEST_EXTERN(VerticesBatch); 31 DRAW_BATCH_TEST_EXTERN(VerticesBatch);
31 32
32 static BatchTestFunc gTestBatches[] = { 33 static BatchTestFunc gTestBatches[] = {
33 DRAW_BATCH_TEST_ENTRY(AAConvexPathBatch), 34 DRAW_BATCH_TEST_ENTRY(AAConvexPathBatch),
34 DRAW_BATCH_TEST_ENTRY(AADistanceFieldPathBatch), 35 DRAW_BATCH_TEST_ENTRY(AADistanceFieldPathBatch),
35 DRAW_BATCH_TEST_ENTRY(AAFillRectBatch), 36 DRAW_BATCH_TEST_ENTRY(AAFillRectBatch),
36 DRAW_BATCH_TEST_ENTRY(AAFillRectBatchLocalMatrix), 37 DRAW_BATCH_TEST_ENTRY(AAFillRectBatchLocalMatrix),
37 DRAW_BATCH_TEST_ENTRY(AAHairlineBatch), 38 DRAW_BATCH_TEST_ENTRY(AAHairlineBatch),
38 DRAW_BATCH_TEST_ENTRY(AAStrokeRectBatch), 39 DRAW_BATCH_TEST_ENTRY(AAStrokeRectBatch),
40 DRAW_BATCH_TEST_ENTRY(AnalyticRectBatch),
39 DRAW_BATCH_TEST_ENTRY(DashBatch), 41 DRAW_BATCH_TEST_ENTRY(DashBatch),
40 DRAW_BATCH_TEST_ENTRY(DefaultPathBatch), 42 DRAW_BATCH_TEST_ENTRY(DefaultPathBatch),
41 DRAW_BATCH_TEST_ENTRY(CircleBatch), 43 DRAW_BATCH_TEST_ENTRY(CircleBatch),
42 DRAW_BATCH_TEST_ENTRY(DIEllipseBatch), 44 DRAW_BATCH_TEST_ENTRY(DIEllipseBatch),
43 DRAW_BATCH_TEST_ENTRY(EllipseBatch), 45 DRAW_BATCH_TEST_ENTRY(EllipseBatch),
44 DRAW_BATCH_TEST_ENTRY(GrDrawAtlasBatch), 46 DRAW_BATCH_TEST_ENTRY(GrDrawAtlasBatch),
45 DRAW_BATCH_TEST_ENTRY(NonAAStrokeRectBatch), 47 DRAW_BATCH_TEST_ENTRY(NonAAStrokeRectBatch),
46 DRAW_BATCH_TEST_ENTRY(RRectBatch), 48 DRAW_BATCH_TEST_ENTRY(RRectBatch),
47 DRAW_BATCH_TEST_ENTRY(TesselatingPathBatch), 49 DRAW_BATCH_TEST_ENTRY(TesselatingPathBatch),
48 DRAW_BATCH_TEST_ENTRY(TextBlobBatch), 50 DRAW_BATCH_TEST_ENTRY(TextBlobBatch),
49 DRAW_BATCH_TEST_ENTRY(VerticesBatch) 51 DRAW_BATCH_TEST_ENTRY(VerticesBatch)
50 }; 52 };
51 53
52 GrDrawBatch* GrRandomDrawBatch(SkRandom* random, GrContext* context) { 54 GrDrawBatch* GrRandomDrawBatch(SkRandom* random, GrContext* context) {
53 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches))); 55 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches)));
54 BatchTestFunc func = gTestBatches[index]; 56 BatchTestFunc func = gTestBatches[index];
55 return (*func)(random, context); 57 return (*func)(random, context);
56 } 58 }
57 #endif 59 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698