| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 | 9 |
| 10 // four rects, of four sizes | 10 // four rects, of four sizes |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 pathB.setFillType((SkPath::FillType) f); | 56 pathB.setFillType((SkPath::FillType) f); |
| 57 pathB.addRect(SkIntToScalar(a), SkIntToScalar(a), SkIntToScalar(b), | 57 pathB.addRect(SkIntToScalar(a), SkIntToScalar(a), SkIntToScalar(b), |
| 58 SkIntToScalar(b), SkPath::kCW_Direction); | 58 SkIntToScalar(b), SkPath::kCW_Direction); |
| 59 pathB.addRect(SkIntToScalar(c), SkIntToScalar(c), SkIntToScalar(d), | 59 pathB.addRect(SkIntToScalar(c), SkIntToScalar(c), SkIntToScalar(d), |
| 60 SkIntToScalar(d), SkPath::kCW_Direction); | 60 SkIntToScalar(d), SkPath::kCW_Direction); |
| 61 pathB.close(); | 61 pathB.close(); |
| 62 for (int op = 0 ; op <= kXOR_PathOp; ++op) { | 62 for (int op = 0 ; op <= kXOR_PathOp; ++op) { |
| 63 if (progress) { | 63 if (progress) { |
| 64 outputProgress(state.fPathStr, pathStr, (SkPathOp) op); | 64 outputProgress(state.fPathStr, pathStr, (SkPathOp) op); |
| 65 } | 65 } |
| 66 testThreadedPathOp(state.fReporter, pathA, pathB, (SkPathOp) op); | 66 testThreadedPathOp(state.fReporter, pathA, pathB, (SkPathOp) op, "re
cts"); |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 DEF_TEST(PathOpsRectsThreaded, reporter) { | 76 DEF_TEST(PathOpsRectsThreaded, reporter) { |
| 77 int threadCount = initializeTests(reporter, "testOp"); | 77 int threadCount = initializeTests(reporter, "testOp"); |
| 78 PathOpsThreadedTestRunner testRunner(reporter, threadCount); | 78 PathOpsThreadedTestRunner testRunner(reporter, threadCount); |
| 79 for (int a = 0; a < 6; ++a) { // outermost | 79 for (int a = 0; a < 6; ++a) { // outermost |
| 80 for (int b = a + 1; b < 7; ++b) { | 80 for (int b = a + 1; b < 7; ++b) { |
| 81 for (int c = 0 ; c < 6; ++c) { | 81 for (int c = 0 ; c < 6; ++c) { |
| 82 for (int d = c + 1; d < 7; ++d) { | 82 for (int d = c + 1; d < 7; ++d) { |
| 83 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, | 83 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, |
| 84 (&testPathOpsRectsMain, a, b, c, d, &testRunner)); | 84 (&testPathOpsRectsMain, a, b, c, d, &testRunner)); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 if (!reporter->allowExtendedTest()) goto finish; | 87 if (!reporter->allowExtendedTest()) goto finish; |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 finish: | 90 finish: |
| 91 testRunner.render(); | 91 testRunner.render(); |
| 92 } | 92 } |
| OLD | NEW |