| 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" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 REPORTER_ASSERT(data->fReporter, classicBounds == tightBounds); | 32 REPORTER_ASSERT(data->fReporter, classicBounds == tightBounds); |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 | 35 |
| 36 DEF_TEST(PathOpsTightBoundsLines, reporter) { | 36 DEF_TEST(PathOpsTightBoundsLines, reporter) { |
| 37 initializeTests(reporter, "tightBoundsLines"); | 37 initializeTests(reporter, "tightBoundsLines"); |
| 38 PathOpsThreadedTestRunner testRunner(reporter); | 38 PathOpsThreadedTestRunner testRunner(reporter); |
| 39 int outerCount = reporter->allowExtendedTest() ? 100 : 1; | 39 int outerCount = reporter->allowExtendedTest() ? 100 : 1; |
| 40 for (int index = 0; index < outerCount; ++index) { | 40 for (int index = 0; index < outerCount; ++index) { |
| 41 for (int idx2 = 0; idx2 < 10; ++idx2) { | 41 for (int idx2 = 0; idx2 < 10; ++idx2) { |
| 42 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable
, | 42 *testRunner.fRunnables.append() = |
| 43 (&testTightBoundsLines, 0, 0, 0, 0, &testRunner)); | 43 new PathOpsThreadedRunnable(&testTightBoundsLines, 0, 0, 0,
0, &testRunner); |
| 44 } | 44 } |
| 45 } | 45 } |
| 46 testRunner.render(); | 46 testRunner.render(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 static void testTightBoundsQuads(PathOpsThreadState* data) { | 49 static void testTightBoundsQuads(PathOpsThreadState* data) { |
| 50 SkRandom ran; | 50 SkRandom ran; |
| 51 const int bitWidth = 32; | 51 const int bitWidth = 32; |
| 52 const int bitHeight = 32; | 52 const int bitHeight = 32; |
| 53 const float pathMin = 1; | 53 const float pathMin = 1; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 DEF_TEST(PathOpsTightBoundsQuads, reporter) { | 111 DEF_TEST(PathOpsTightBoundsQuads, reporter) { |
| 112 initializeTests(reporter, "tightBoundsQuads"); | 112 initializeTests(reporter, "tightBoundsQuads"); |
| 113 PathOpsThreadedTestRunner testRunner(reporter); | 113 PathOpsThreadedTestRunner testRunner(reporter); |
| 114 int outerCount = reporter->allowExtendedTest() ? 100 : 1; | 114 int outerCount = reporter->allowExtendedTest() ? 100 : 1; |
| 115 for (int index = 0; index < outerCount; ++index) { | 115 for (int index = 0; index < outerCount; ++index) { |
| 116 for (int idx2 = 0; idx2 < 10; ++idx2) { | 116 for (int idx2 = 0; idx2 < 10; ++idx2) { |
| 117 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreadedRunnable
, | 117 *testRunner.fRunnables.append() = |
| 118 (&testTightBoundsQuads, 0, 0, 0, 0, &testRunner)); | 118 new PathOpsThreadedRunnable(&testTightBoundsQuads, 0, 0, 0,
0, &testRunner); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 testRunner.render(); | 121 testRunner.render(); |
| 122 } | 122 } |
| OLD | NEW |