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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 SkRegion::Op ops[] = { | 64 SkRegion::Op ops[] = { |
65 SkRegion::kDifference_Op, | 65 SkRegion::kDifference_Op, |
66 SkRegion::kIntersect_Op, | 66 SkRegion::kIntersect_Op, |
67 SkRegion::kUnion_Op, | 67 SkRegion::kUnion_Op, |
68 SkRegion::kXOR_Op, | 68 SkRegion::kXOR_Op, |
69 SkRegion::kReverseDifference_Op, | 69 SkRegion::kReverseDifference_Op, |
70 SkRegion::kReplace_Op, | 70 SkRegion::kReplace_Op, |
71 }; | 71 }; |
72 | 72 |
73 SkRandom r; | 73 SkLCGRandom r; |
74 for (int i = 0; i < kRows; ++i) { | 74 for (int i = 0; i < kRows; ++i) { |
75 for (int j = 0; j < kCols; ++j) { | 75 for (int j = 0; j < kCols; ++j) { |
76 for (int k = 0; k < 5; ++k) { | 76 for (int k = 0; k < 5; ++k) { |
77 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)]; | 77 fOps[j*kRows+i][k] = ops[r.nextU() % SK_ARRAY_COUNT(ops)]; |
78 } | 78 } |
79 } | 79 } |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 protected: | 83 protected: |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 // aa rects | 174 // aa rects |
175 static GM* MyFactory3(void*) { return new ComplexClip2GM(false, true); } | 175 static GM* MyFactory3(void*) { return new ComplexClip2GM(false, true); } |
176 static GMRegistry reg3(MyFactory3); | 176 static GMRegistry reg3(MyFactory3); |
177 | 177 |
178 // aa paths | 178 // aa paths |
179 static GM* MyFactory4(void*) { return new ComplexClip2GM(true, true); } | 179 static GM* MyFactory4(void*) { return new ComplexClip2GM(true, true); } |
180 static GMRegistry reg4(MyFactory4); | 180 static GMRegistry reg4(MyFactory4); |
181 | 181 |
182 } | 182 } |
OLD | NEW |