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

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

Issue 1108403005: Add batch unit tests for ovals (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 7 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 | « src/gpu/GrBatch.h ('k') | src/gpu/GrOvalRenderer.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(AAFillRectBatch); 14 BATCH_TEST_EXTERN(AAFillRectBatch);
15 BATCH_TEST_EXTERN(AAStrokeRectBatch); 15 BATCH_TEST_EXTERN(AAStrokeRectBatch);
16 BATCH_TEST_EXTERN(DashBatch);
17 BATCH_TEST_EXTERN(CircleBatch);
18 BATCH_TEST_EXTERN(DIEllipseBatch);
19 BATCH_TEST_EXTERN(EllipseBatch);
20 BATCH_TEST_EXTERN(RRectBatch);
16 21
17 static BatchTestFunc gTestBatches[] = { 22 static BatchTestFunc gTestBatches[] = {
18 BATCH_TEST_ENTRY(AAFillRectBatch), 23 BATCH_TEST_ENTRY(AAFillRectBatch),
19 BATCH_TEST_ENTRY(AAStrokeRectBatch), 24 BATCH_TEST_ENTRY(AAStrokeRectBatch),
25 BATCH_TEST_ENTRY(DashBatch),
26 BATCH_TEST_ENTRY(CircleBatch),
27 BATCH_TEST_ENTRY(DIEllipseBatch),
28 BATCH_TEST_ENTRY(EllipseBatch),
29 BATCH_TEST_ENTRY(RRectBatch)
30
20 }; 31 };
21 32
22 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) { 33 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) {
23 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches))); 34 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches)));
24 BatchTestFunc func = gTestBatches[index]; 35 BatchTestFunc func = gTestBatches[index];
25 return (*func)(random, context); 36 return (*func)(random, context);
26 } 37 }
27 #endif 38 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBatch.h ('k') | src/gpu/GrOvalRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698