OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #include "gm.h" | 9 #include "gm.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 SkRegion::Op ops[] = { | 75 SkRegion::Op ops[] = { |
76 SkRegion::kDifference_Op, | 76 SkRegion::kDifference_Op, |
77 SkRegion::kIntersect_Op, | 77 SkRegion::kIntersect_Op, |
78 SkRegion::kUnion_Op, | 78 SkRegion::kUnion_Op, |
79 SkRegion::kXOR_Op, | 79 SkRegion::kXOR_Op, |
80 SkRegion::kReverseDifference_Op, | 80 SkRegion::kReverseDifference_Op, |
81 SkRegion::kReplace_Op, | 81 SkRegion::kReplace_Op, |
82 }; | 82 }; |
83 | 83 |
84 SkLCGRandom r; | 84 SkRandom r; |
85 for (int i = 0; i < kRows; ++i) { | 85 for (int i = 0; i < kRows; ++i) { |
86 for (int j = 0; j < kCols; ++j) { | 86 for (int j = 0; j < kCols; ++j) { |
87 for (int k = 0; k < 5; ++k) { | 87 for (int k = 0; k < 5; ++k) { |
88 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)]; | 88 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)]; |
89 } | 89 } |
90 } | 90 } |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 protected: | 94 protected: |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); ) | 213 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, false); ) |
214 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); ) | 214 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, false); ) |
215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); ) | 215 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, false); ) |
216 | 216 |
217 // aa | 217 // aa |
218 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); ) | 218 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRect_Clip, true); ) |
219 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); ) | 219 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kRRect_Clip, true); ) |
220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); ) | 220 DEF_GM( return new ComplexClip2GM(ComplexClip2GM::kPath_Clip, true); ) |
221 | 221 |
222 } | 222 } |
OLD | NEW |