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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 pathB.setFillType((SkPath::FillType) f); | 64 pathB.setFillType((SkPath::FillType) f); |
65 pathB.addRect(SkIntToScalar(a), SkIntToScalar(a), SkIntToScalar(b), | 65 pathB.addRect(SkIntToScalar(a), SkIntToScalar(a), SkIntToScalar(b), |
66 SkIntToScalar(b), SkPath::kCW_Direction); | 66 SkIntToScalar(b), SkPath::kCW_Direction); |
67 pathB.addRect(SkIntToScalar(c), SkIntToScalar(c), SkIntToScalar(d), | 67 pathB.addRect(SkIntToScalar(c), SkIntToScalar(c), SkIntToScalar(d), |
68 SkIntToScalar(d), SkPath::kCW_Direction); | 68 SkIntToScalar(d), SkPath::kCW_Direction); |
69 pathB.close(); | 69 pathB.close(); |
70 for (int op = 0 ; op <= kXOR_SkPathOp; ++op) { | 70 for (int op = 0 ; op <= kXOR_SkPathOp; ++op) { |
71 if (progress) { | 71 if (progress) { |
72 outputProgress(state.fPathStr, pathStr, (SkPathOp) op); | 72 outputProgress(state.fPathStr, pathStr, (SkPathOp) op); |
73 } | 73 } |
74 testThreadedPathOp(state.fReporter, pathA, pathB, (SkPathOp) op, "re
cts"); | 74 testPathOp(state.fReporter, pathA, pathB, (SkPathOp) op, "rects"); |
75 } | 75 } |
76 } | 76 } |
77 } | 77 } |
78 } | 78 } |
79 } | 79 } |
80 } | 80 } |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 DEF_TEST(PathOpsRectsThreaded, reporter) { | 84 DEF_TEST(PathOpsRectsThreaded, reporter) { |
85 initializeTests(reporter, "testOp"); | 85 initializeTests(reporter, "testOp"); |
86 PathOpsThreadedTestRunner testRunner(reporter); | 86 PathOpsThreadedTestRunner testRunner(reporter); |
87 for (int a = 0; a < 6; ++a) { // outermost | 87 for (int a = 0; a < 6; ++a) { // outermost |
88 for (int b = a + 1; b < 7; ++b) { | 88 for (int b = a + 1; b < 7; ++b) { |
89 for (int c = 0 ; c < 6; ++c) { | 89 for (int c = 0 ; c < 6; ++c) { |
90 for (int d = c + 1; d < 7; ++d) { | 90 for (int d = c + 1; d < 7; ++d) { |
91 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, | 91 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, |
92 (&testPathOpsRectsMain, a, b, c, d, &testRunner)); | 92 (&testPathOpsRectsMain, a, b, c, d, &testRunner)); |
93 } | 93 } |
94 } | 94 } |
95 if (!reporter->allowExtendedTest()) goto finish; | 95 if (!reporter->allowExtendedTest()) goto finish; |
96 } | 96 } |
97 } | 97 } |
98 finish: | 98 finish: |
99 testRunner.render(); | 99 testRunner.render(); |
100 } | 100 } |
OLD | NEW |