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