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

Side by Side Diff: include/gpu/GrTestUtils.h

Issue 1127183006: tesselating path renderer unit tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clang 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 | « no previous file | src/gpu/GrTessellatingPathRenderer.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 GrTestUtils_DEFINED 8 #ifndef GrTestUtils_DEFINED
9 #define GrTestUtils_DEFINED 9 #define GrTestUtils_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 12
13 #ifdef GR_TEST_UTILS 13 #ifdef GR_TEST_UTILS
14 14
15 #include "GrColor.h" 15 #include "GrColor.h"
16 #include "SkRandom.h" 16 #include "SkRandom.h"
17 17
18 class SkMatrix; 18 class SkMatrix;
19 class SkPath; 19 class SkPath;
20 class SkRRect; 20 class SkRRect;
21 struct SkRect; 21 struct SkRect;
22 22
23 namespace GrTest { 23 namespace GrTest {
24 /** 24 /**
25 * A helper for use in Test functions. 25 * A helper for use in Test functions.
26 */ 26 */
27 const SkMatrix& TestMatrix(SkRandom*); 27 const SkMatrix& TestMatrix(SkRandom*);
28 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*); 28 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*);
29 const SkMatrix& TestMatrixRectStaysRect(SkRandom*); 29 const SkMatrix& TestMatrixRectStaysRect(SkRandom*);
30 const SkMatrix& TestMatrixInvertible(SkRandom*);
30 const SkRect& TestRect(SkRandom*); 31 const SkRect& TestRect(SkRandom*);
31 const SkRRect& TestRRectSimple(SkRandom*); 32 const SkRRect& TestRRectSimple(SkRandom*);
32 const SkPath& TestPath(SkRandom*); 33 const SkPath& TestPath(SkRandom*);
33 34
34 } 35 }
35 36
36 static inline GrColor GrRandomColor(SkRandom* random) { 37 static inline GrColor GrRandomColor(SkRandom* random) {
37 // There are only a few cases of random colors which interest us 38 // There are only a few cases of random colors which interest us
38 enum ColorMode { 39 enum ColorMode {
39 kAllOnes_ColorMode, 40 kAllOnes_ColorMode,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 break; 90 break;
90 case kRandom_CoverageMode: 91 case kRandom_CoverageMode:
91 coverage = random->nextULessThan(256); 92 coverage = random->nextULessThan(256);
92 break; 93 break;
93 } 94 }
94 return coverage; 95 return coverage;
95 } 96 }
96 97
97 #endif 98 #endif
98 #endif 99 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698