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

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

Issue 1109153004: Initial CL to create GrBatchTest infrastructure (Closed) Base URL: https://skia.googlesource.com/skia.git@rand-batch0
Patch Set: windows warnings 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
OLDNEW
(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 #ifdef GR_TEST_UTILS
13
14 BATCH_TEST_EXTERN(AAFillRectBatch);
15 BATCH_TEST_EXTERN(AAStrokeRectBatch);
16
17 static BatchTestFunc gTestBatches[] = {
18 BATCH_TEST_ENTRY(AAFillRectBatch),
19 BATCH_TEST_ENTRY(AAStrokeRectBatch),
20 };
21
22 GrBatch* GrRandomBatch(SkRandom* random, GrContext* context) {
23 uint32_t index = random->nextULessThan(static_cast<uint32_t>(SK_ARRAY_COUNT( gTestBatches)));
24 BatchTestFunc func = gTestBatches[index];
25 return (*func)(random, context);
26 }
27 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBatchTest.h ('k') | src/gpu/GrTestUtils.cpp » ('j') | src/gpu/GrTestUtils.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698