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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 SkIntToScalar(state.fB), SkPath::kCW_Direction); | 52 SkIntToScalar(state.fB), SkPath::kCW_Direction); |
53 pathA.addRect(SkIntToScalar(state.fC), SkIntToScalar(state.fC), SkIntToS
calar(state.fD), | 53 pathA.addRect(SkIntToScalar(state.fC), SkIntToScalar(state.fC), SkIntToS
calar(state.fD), |
54 SkIntToScalar(state.fD), SkPath::kCW_Direction); | 54 SkIntToScalar(state.fD), SkPath::kCW_Direction); |
55 pathA.close(); | 55 pathA.close(); |
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_SkPathOp; ++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, "re
cts"); | 66 testThreadedPathOp(state.fReporter, pathA, pathB, (SkPathOp) op, "re
cts"); |
67 } | 67 } |
68 } | 68 } |
69 } | 69 } |
70 } | 70 } |
71 } | 71 } |
72 } | 72 } |
(...skipping 10 matching lines...) Expand all Loading... |
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 |