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

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

Issue 1134753002: convex path renderer unit tests (Closed) Base URL: https://skia.googlesource.com/skia.git@randbatch10
Patch Set: 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/GrAAConvexPathRenderer.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
(...skipping 14 matching lines...) Expand all
25 /** 25 /**
26 * A helper for use in Test functions. 26 * A helper for use in Test functions.
27 */ 27 */
28 const SkMatrix& TestMatrix(SkRandom*); 28 const SkMatrix& TestMatrix(SkRandom*);
29 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*); 29 const SkMatrix& TestMatrixPreservesRightAngles(SkRandom*);
30 const SkMatrix& TestMatrixRectStaysRect(SkRandom*); 30 const SkMatrix& TestMatrixRectStaysRect(SkRandom*);
31 const SkMatrix& TestMatrixInvertible(SkRandom*); 31 const SkMatrix& TestMatrixInvertible(SkRandom*);
32 const SkRect& TestRect(SkRandom*); 32 const SkRect& TestRect(SkRandom*);
33 const SkRRect& TestRRectSimple(SkRandom*); 33 const SkRRect& TestRRectSimple(SkRandom*);
34 const SkPath& TestPath(SkRandom*); 34 const SkPath& TestPath(SkRandom*);
35 const SkPath& TestPathConvex(SkRandom*);
35 SkStrokeRec TestStrokeRec(SkRandom*); 36 SkStrokeRec TestStrokeRec(SkRandom*);
36 37
37 } 38 }
38 39
39 static inline GrColor GrRandomColor(SkRandom* random) { 40 static inline GrColor GrRandomColor(SkRandom* random) {
40 // There are only a few cases of random colors which interest us 41 // There are only a few cases of random colors which interest us
41 enum ColorMode { 42 enum ColorMode {
42 kAllOnes_ColorMode, 43 kAllOnes_ColorMode,
43 kAllZeros_ColorMode, 44 kAllZeros_ColorMode,
44 kAlphaOne_ColorMode, 45 kAlphaOne_ColorMode,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 break; 93 break;
93 case kRandom_CoverageMode: 94 case kRandom_CoverageMode:
94 coverage = random->nextULessThan(256); 95 coverage = random->nextULessThan(256);
95 break; 96 break;
96 } 97 }
97 return coverage; 98 return coverage;
98 } 99 }
99 100
100 #endif 101 #endif
101 #endif 102 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698