OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
8 #include "PathOpsThreadedCommon.h" | 8 #include "PathOpsThreadedCommon.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkRandom.h" | 10 #include "SkRandom.h" |
| 11 #include "SkTArray.h" |
11 #include "SkTSort.h" | 12 #include "SkTSort.h" |
12 #include "Test.h" | 13 #include "Test.h" |
13 | 14 |
14 static void testTightBoundsLines(PathOpsThreadState* data) { | 15 static void testTightBoundsLines(PathOpsThreadState* data) { |
15 SkRandom ran; | 16 SkRandom ran; |
16 for (int index = 0; index < 1000; ++index) { | 17 for (int index = 0; index < 1000; ++index) { |
17 SkPath path; | 18 SkPath path; |
18 int contourCount = ran.nextRangeU(1, 10); | 19 int contourCount = ran.nextRangeU(1, 10); |
19 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { | 20 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { |
20 int lineCount = ran.nextRangeU(1, 10); | 21 int lineCount = ran.nextRangeU(1, 10); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 PathOpsThreadedTestRunner testRunner(reporter); | 114 PathOpsThreadedTestRunner testRunner(reporter); |
114 int outerCount = reporter->allowExtendedTest() ? 100 : 1; | 115 int outerCount = reporter->allowExtendedTest() ? 100 : 1; |
115 for (int index = 0; index < outerCount; ++index) { | 116 for (int index = 0; index < outerCount; ++index) { |
116 for (int idx2 = 0; idx2 < 10; ++idx2) { | 117 for (int idx2 = 0; idx2 < 10; ++idx2) { |
117 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable
, | 118 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable
, |
118 (&testTightBoundsQuads, 0, 0, 0, 0, &testRunner)); | 119 (&testTightBoundsQuads, 0, 0, 0, 0, &testRunner)); |
119 } | 120 } |
120 } | 121 } |
121 testRunner.render(); | 122 testRunner.render(); |
122 } | 123 } |
OLD | NEW |