| 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 | 8 |
| 9 #define TEST(name) { name, #name } | 9 #define TEST(name) { name, #name } |
| 10 | 10 |
| (...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 | 1144 |
| 1145 SkPathOp ops[] = { | 1145 SkPathOp ops[] = { |
| 1146 kUnion_PathOp, | 1146 kUnion_PathOp, |
| 1147 kXOR_PathOp, | 1147 kXOR_PathOp, |
| 1148 kReverseDifference_PathOp, | 1148 kReverseDifference_PathOp, |
| 1149 kXOR_PathOp, | 1149 kXOR_PathOp, |
| 1150 kReverseDifference_PathOp, | 1150 kReverseDifference_PathOp, |
| 1151 }; | 1151 }; |
| 1152 | 1152 |
| 1153 static void rRect1(skiatest::Reporter* reporter) { | 1153 static void rRect1(skiatest::Reporter* reporter) { |
| 1154 SkScalar xA = SkFloatToScalar(0.65f); | 1154 SkScalar xA = 0.65f; |
| 1155 SkScalar xB = SkFloatToScalar(10.65f); | 1155 SkScalar xB = 10.65f; |
| 1156 SkScalar xC = SkFloatToScalar(20.65f); | 1156 SkScalar xC = 20.65f; |
| 1157 SkScalar xD = SkFloatToScalar(30.65f); | 1157 SkScalar xD = 30.65f; |
| 1158 SkScalar xE = SkFloatToScalar(40.65f); | 1158 SkScalar xE = 40.65f; |
| 1159 SkScalar xF = SkFloatToScalar(50.65f); | 1159 SkScalar xF = 50.65f; |
| 1160 | 1160 |
| 1161 SkScalar yA = SkFloatToScalar(0.65f); | 1161 SkScalar yA = 0.65f; |
| 1162 SkScalar yB = SkFloatToScalar(10.65f); | 1162 SkScalar yB = 10.65f; |
| 1163 SkScalar yC = SkFloatToScalar(20.65f); | 1163 SkScalar yC = 20.65f; |
| 1164 SkScalar yD = SkFloatToScalar(30.65f); | 1164 SkScalar yD = 30.65f; |
| 1165 SkScalar yE = SkFloatToScalar(40.65f); | 1165 SkScalar yE = 40.65f; |
| 1166 SkScalar yF = SkFloatToScalar(50.65f); | 1166 SkScalar yF = 50.65f; |
| 1167 SkPath paths[5]; | 1167 SkPath paths[5]; |
| 1168 SkRect rects[5]; | 1168 SkRect rects[5]; |
| 1169 rects[0].set(xB, yB, xE, yE); | 1169 rects[0].set(xB, yB, xE, yE); |
| 1170 paths[0].addRoundRect(rects[0], SkIntToScalar(5), SkIntToScalar(5)); // red | 1170 paths[0].addRoundRect(rects[0], SkIntToScalar(5), SkIntToScalar(5)); // red |
| 1171 rects[1].set(xA, yA, xD, yD); | 1171 rects[1].set(xA, yA, xD, yD); |
| 1172 paths[1].addRoundRect(rects[1], SkIntToScalar(5), SkIntToScalar(5)); // gre
en | 1172 paths[1].addRoundRect(rects[1], SkIntToScalar(5), SkIntToScalar(5)); // gre
en |
| 1173 rects[2].set(xC, yA, xF, yD); | 1173 rects[2].set(xC, yA, xF, yD); |
| 1174 paths[2].addRoundRect(rects[2], SkIntToScalar(5), SkIntToScalar(5)); // blu
e | 1174 paths[2].addRoundRect(rects[2], SkIntToScalar(5), SkIntToScalar(5)); // blu
e |
| 1175 rects[3].set(xA, yC, xD, yF); | 1175 rects[3].set(xA, yC, xD, yF); |
| 1176 paths[3].addRoundRect(rects[3], SkIntToScalar(5), SkIntToScalar(5)); // yel
low | 1176 paths[3].addRoundRect(rects[3], SkIntToScalar(5), SkIntToScalar(5)); // yel
low |
| (...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3301 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); | 3301 RunTestSet(reporter, subTests, subTestCount, firstSubTest, stopTest, run
Reverse); |
| 3302 } | 3302 } |
| 3303 #ifdef SK_DEBUG | 3303 #ifdef SK_DEBUG |
| 3304 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; | 3304 SkPathOpsDebug::gMaxWindSum = SK_MaxS32; |
| 3305 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; | 3305 SkPathOpsDebug::gMaxWindValue = SK_MaxS32; |
| 3306 #endif | 3306 #endif |
| 3307 } | 3307 } |
| 3308 | 3308 |
| 3309 #include "TestClassDef.h" | 3309 #include "TestClassDef.h" |
| 3310 DEFINE_TESTCLASS_SHORT(PathOpsOpTest) | 3310 DEFINE_TESTCLASS_SHORT(PathOpsOpTest) |
| OLD | NEW |