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

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

Issue 1293583002: Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for non-drawing batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove duplicated fields in GrVertexBatch 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 | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchTest.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 #ifndef GrBatchTest_DEFINED 8 #ifndef GrBatchTest_DEFINED
9 #define GrBatchTest_DEFINED 9 #define GrBatchTest_DEFINED
10 10
11 #include "GrTestUtils.h" 11 #include "GrTestUtils.h"
12 12
13 #ifdef GR_TEST_UTILS 13 #ifdef GR_TEST_UTILS
14 14
15 class GrBatch; 15 class GrDrawBatch;
16 class GrContext; 16 class GrContext;
17 class SkRandom; 17 class SkRandom;
18 18
19 /* 19 /*
20 * This file defines some macros for testing batches, and also declares function s / objects which 20 * This file defines some macros for testing batches, and also declares function s / objects which
21 * are generally useful for GrBatch testing 21 * are generally useful for GrBatch testing
22 */ 22 */
23 23
24 // Batches should define test functions using BATCH_TEST_DEFINE. The other macr os defined below 24 // Batches should define test functions using DRAW_BATCH_TEST_DEFINE. The other macros defined
25 // are used exclusively by the test harness. 25 // below are used exclusively by the test harness.
26 typedef GrBatch* (*BatchTestFunc)(SkRandom* random, GrContext* context); 26 typedef GrDrawBatch* (*BatchTestFunc)(SkRandom* random, GrContext* context);
27 #define BATCH_TEST_DEFINE(Batch) \ 27 #define DRAW_BATCH_TEST_DEFINE(Batch) \
28 GrBatch* Batch##__Test(SkRandom* random, GrContext* context) 28 GrDrawBatch* Batch##__Test(SkRandom* random, GrContext* context)
29 #define BATCH_TEST_EXTERN(Batch) \ 29 #define DRAW_BATCH_TEST_EXTERN(Batch) \
30 extern GrBatch* Batch##__Test(SkRandom*, GrContext* context); 30 extern GrDrawBatch* Batch##__Test(SkRandom*, GrContext* context);
31 #define BATCH_TEST_ENTRY(Batch) \ 31 #define DRAW_BATCH_TEST_ENTRY(Batch) \
32 Batch##__Test 32 Batch##__Test
33 #define BATCH_TEST_FRIEND(Batch) \ 33 #define DRAW_BATCH_TEST_FRIEND(Batch) \
34 friend GrBatch* Batch##__Test(SkRandom* random, GrContext* context); 34 friend GrDrawBatch* Batch##__Test(SkRandom* random, GrContext* context);
35 35
36 GrBatch* GrRandomBatch(SkRandom*, GrContext*); 36 GrDrawBatch* GrRandomDrawBatch(SkRandom*, GrContext*);
37 37
38 #endif 38 #endif
39 #endif 39 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698