OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 | 7 |
8 #include "SkCommonFlagsConfig.h" | 8 #include "SkCommonFlagsConfig.h" |
9 #include "SkColorSpace_Base.h" | 9 #include "SkColorSpace_Base.h" |
10 #include "Test.h" | 10 #include "Test.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 REPORTER_ASSERT(reporter, configs.count() == 1); | 70 REPORTER_ASSERT(reporter, configs.count() == 1); |
71 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gl")); | 71 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gl")); |
72 } | 72 } |
73 | 73 |
74 DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { | 74 DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { |
75 // Parses all default configs and returns correct "tag". | 75 // Parses all default configs and returns correct "tag". |
76 | 76 |
77 SkCommandLineFlags::StringArray config1 = make_string_array({ | 77 SkCommandLineFlags::StringArray config1 = make_string_array({ |
78 "565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16"
, "msaa4", | 78 "565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16"
, "msaa4", |
79 "nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvpr
dit4", "pdf", "skp", | 79 "nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvpr
dit4", "pdf", "skp", |
80 "svg", "xps", "angle_d3d11_es2", "angle_gl_es2", "commandbuffer", "mesa"
, "hwui", "gpuf16", | 80 "svg", "xps", "angle", "angle-gl", "commandbuffer", "mesa", "hwui", "gpu
f16", "gpusrgb", |
81 "gpusrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk", "gl
inst", "glinst4", | 81 "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk", "glinst", "gli
nst4", "glinstdit4", |
82 "glinstdit4", "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit
4", "glwide" | 82 "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit4", "glwide" |
83 }); | 83 }); |
84 | 84 |
85 SkCommandLineConfigArray configs; | 85 SkCommandLineConfigArray configs; |
86 ParseConfigs(config1, &configs); | 86 ParseConfigs(config1, &configs); |
87 | 87 |
88 auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); | 88 auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
89 | 89 |
90 REPORTER_ASSERT(reporter, configs.count() == config1.count()); | 90 REPORTER_ASSERT(reporter, configs.count() == config1.count()); |
91 for (int i = 0; i < config1.count(); ++i) { | 91 for (int i = 0; i < config1.count(); ++i) { |
92 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); | 92 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getUseInstanced()); | 160 REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getUseInstanced()); |
161 REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getContextType() == | 161 REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getContextType() == |
162 GrContextFactory::kGLES_ContextType); | 162 GrContextFactory::kGLES_ContextType); |
163 REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getUseInstanced()); | 163 REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getUseInstanced()); |
164 REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getSamples() == 4); | 164 REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getSamples() == 4); |
165 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getContextType() == | 165 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getContextType() == |
166 GrContextFactory::kGLES_ContextType); | 166 GrContextFactory::kGLES_ContextType); |
167 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseInstanced()); | 167 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseInstanced()); |
168 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseDIText()); | 168 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseDIText()); |
169 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getSamples() == 4); | 169 REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getSamples() == 4); |
| 170 |
| 171 #if SK_ANGLE |
| 172 #ifdef SK_BUILD_FOR_WIN |
170 REPORTER_ASSERT(reporter, configs[20]->asConfigGpu()); | 173 REPORTER_ASSERT(reporter, configs[20]->asConfigGpu()); |
| 174 #else |
| 175 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu()); |
| 176 #endif |
171 REPORTER_ASSERT(reporter, configs[21]->asConfigGpu()); | 177 REPORTER_ASSERT(reporter, configs[21]->asConfigGpu()); |
| 178 #else |
| 179 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu()); |
| 180 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu()); |
| 181 #endif |
172 REPORTER_ASSERT(reporter, configs[22]->asConfigGpu()); | 182 REPORTER_ASSERT(reporter, configs[22]->asConfigGpu()); |
173 #if SK_MESA | 183 #if SK_MESA |
174 REPORTER_ASSERT(reporter, configs[23]->asConfigGpu()); | 184 REPORTER_ASSERT(reporter, configs[23]->asConfigGpu()); |
175 #else | 185 #else |
176 REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu()); | 186 REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu()); |
177 #endif | 187 #endif |
178 REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()); | 188 REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()); |
179 REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()); | 189 REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()); |
180 REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getSamples() == 4); | 190 REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getSamples() == 4); |
181 REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getUseNVPR()); | 191 REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getUseNVPR()); |
182 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()); | 192 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()); |
183 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getSamples() == 4); | 193 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getSamples() == 4); |
184 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseNVPR()); | 194 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseNVPR()); |
185 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseDIText()); | 195 REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseDIText()); |
186 REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()); | 196 REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()); |
187 REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorType() == kRG
BA_8888_SkColorType); | 197 REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorType() == kRG
BA_8888_SkColorType); |
188 REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorSpace() == srg
bColorSpace.get()); | 198 REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorSpace() == srg
bColorSpace.get()); |
189 REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()); | 199 REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()); |
190 REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getSamples() == 4); | 200 REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getSamples() == 4); |
191 #ifdef SK_VULKAN | 201 #ifdef SK_VULKAN |
192 REPORTER_ASSERT(reporter, configs[32]->asConfigGpu()); | 202 REPORTER_ASSERT(reporter, configs[32]->asConfigGpu()); |
193 #endif | 203 #endif |
194 #endif | 204 #endif |
195 } | 205 } |
196 | 206 |
197 DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { | 207 DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { |
198 SkCommandLineFlags::StringArray config1 = make_string_array({ | 208 SkCommandLineFlags::StringArray config1 = make_string_array({ |
199 "gpu[nvpr=true,dit=false]", | 209 "gpu[nvpr=true,dit=false]", |
200 "gpu[api=angle_d3d9_es2]", | 210 "gpu[api=angle]", |
201 "gpu[api=angle_gl_es3]", | 211 "gpu[api=angle-gl]", |
202 "gpu[api=mesa,samples=77]", | 212 "gpu[api=mesa,samples=77]", |
203 "gpu[dit=true,api=commandbuffer]", | 213 "gpu[dit=true,api=commandbuffer]", |
204 "gpu[]", | 214 "gpu[]", |
205 "gpu[api=gles]", | 215 "gpu[api=gles]", |
206 "gpu[api=gl]", | 216 "gpu[api=gl]", |
207 "gpu[api=vulkan]", | 217 "gpu[api=vulkan]", |
208 }); | 218 }); |
209 | 219 |
210 SkCommandLineConfigArray configs; | 220 SkCommandLineConfigArray configs; |
211 ParseConfigs(config1, &configs); | 221 ParseConfigs(config1, &configs); |
212 REPORTER_ASSERT(reporter, configs.count() == config1.count()); | 222 REPORTER_ASSERT(reporter, configs.count() == config1.count()); |
213 for (int i = 0; i < config1.count(); ++i) { | 223 for (int i = 0; i < config1.count(); ++i) { |
214 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); | 224 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); |
215 } | 225 } |
216 #if SK_SUPPORT_GPU | 226 #if SK_SUPPORT_GPU |
217 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() == | 227 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() == |
218 GrContextFactory::kNativeGL_ContextType); | 228 GrContextFactory::kNativeGL_ContextType); |
219 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR()); | 229 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR()); |
220 REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()->getUseDIText()); | 230 REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()->getUseDIText()); |
221 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0); | 231 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0); |
| 232 #if SK_ANGLE |
| 233 #ifdef SK_BUILD_FOR_WIN |
222 REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()->getContextType() == | 234 REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()->getContextType() == |
223 GrContextFactory::kANGLE_D3D9_ES2_ContextType); | 235 GrContextFactory::kANGLE_ContextType); |
224 REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()); | 236 #else |
| 237 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
| 238 #endif |
225 REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() == | 239 REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() == |
226 GrContextFactory::kANGLE_GL_ES3_ContextType); | 240 GrContextFactory::kANGLE_GL_ContextType); |
227 REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()); | 241 #else |
| 242 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
| 243 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
| 244 #endif |
228 #if SK_MESA | 245 #if SK_MESA |
229 REPORTER_ASSERT(reporter, configs[3]->asConfigGpu()->getContextType() == | 246 REPORTER_ASSERT(reporter, configs[3]->asConfigGpu()->getContextType() == |
230 GrContextFactory::kMESA_ContextType); | 247 GrContextFactory::kMESA_ContextType); |
231 #else | 248 #else |
232 REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu()); | 249 REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu()); |
233 #endif | 250 #endif |
234 REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() == | 251 REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() == |
235 GrContextFactory::kCommandBuffer_ContextType); | 252 GrContextFactory::kCommandBuffer_ContextType); |
236 | 253 |
237 REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() == | 254 REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() == |
(...skipping 18 matching lines...) Expand all Loading... |
256 REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText()); | 273 REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText()); |
257 REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0); | 274 REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0); |
258 #endif | 275 #endif |
259 #endif | 276 #endif |
260 } | 277 } |
261 | 278 |
262 DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) { | 279 DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) { |
263 SkCommandLineFlags::StringArray config1 = make_string_array({ | 280 SkCommandLineFlags::StringArray config1 = make_string_array({ |
264 "gpu[nvpr=1]", // Number as bool. | 281 "gpu[nvpr=1]", // Number as bool. |
265 "gpu[api=gl,]", // Trailing in comma. | 282 "gpu[api=gl,]", // Trailing in comma. |
266 "gpu[api=angle_glu]", // Unknown api. | 283 "gpu[api=angle-glu]", // Unknown api. |
267 "gpu[api=,samples=0]", // Empty api. | 284 "gpu[api=,samples=0]", // Empty api. |
268 "gpu[samples=true]", // Value true as a number. | 285 "gpu[samples=true]", // Value true as a number. |
269 "gpu[samples=0,samples=0]", // Duplicate option key. | 286 "gpu[samples=0,samples=0]", // Duplicate option key. |
270 "gpu[,samples=0]", // Leading comma. | 287 "gpu[,samples=0]", // Leading comma. |
271 "gpu[samples=54", // Missing closing parenthesis. | 288 "gpu[samples=54", // Missing closing parenthesis. |
272 ",,", | 289 ",,", |
273 "gpu[", // Missing bracket. | 290 "gpu[", // Missing bracket. |
274 "samples=54" // No backend. | 291 "samples=54" // No backend. |
275 "gpu[nvpr=true ]", // Space. | 292 "gpu[nvpr=true ]", // Space. |
276 }); | 293 }); |
(...skipping 28 matching lines...) Expand all Loading... |
305 REPORTER_ASSERT(reporter, configs[i]->asConfigGpu()); | 322 REPORTER_ASSERT(reporter, configs[i]->asConfigGpu()); |
306 #else | 323 #else |
307 REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(config1[i])); | 324 REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(config1[i])); |
308 #endif | 325 #endif |
309 } | 326 } |
310 } | 327 } |
311 DEF_TEST(ParseConfigs_ViaParsing, reporter) { | 328 DEF_TEST(ParseConfigs_ViaParsing, reporter) { |
312 SkCommandLineFlags::StringArray config1 = make_string_array({ | 329 SkCommandLineFlags::StringArray config1 = make_string_array({ |
313 "a-b-c-8888", | 330 "a-b-c-8888", |
314 "zz-qq-gpu", | 331 "zz-qq-gpu", |
315 "a-angle_gl_es2" | 332 "a-angle-gl" |
316 }); | 333 }); |
317 | 334 |
318 SkCommandLineConfigArray configs; | 335 SkCommandLineConfigArray configs; |
319 ParseConfigs(config1, &configs); | 336 ParseConfigs(config1, &configs); |
320 const struct { | 337 const struct { |
321 const char* backend; | 338 const char* backend; |
322 const char* vias[3]; | 339 const char* vias[3]; |
323 } expectedConfigs[] = { | 340 } expectedConfigs[] = { |
324 {"8888", {"a", "b", "c"}}, | 341 {"8888", {"a", "b", "c"}}, |
325 {"gpu", {"zz", "qq", nullptr}}, | 342 {"gpu", {"zz", "qq", nullptr}}, |
326 {"gpu", { "a", nullptr, nullptr }} | 343 #if SK_ANGLE |
| 344 { "gpu",{ "a", nullptr, nullptr } } // With SK_ANGLE, angle-gl becomes
gpu(api=angle-gl) |
| 345 #else |
| 346 { "angle-gl",{ "a", nullptr, nullptr } } // The angle-gl tag is only ta
g that contains |
| 347 // hyphen. |
| 348 #endif |
327 }; | 349 }; |
328 for (int i = 0; i < config1.count(); ++i) { | 350 for (int i = 0; i < config1.count(); ++i) { |
329 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); | 351 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); |
330 REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfig
s[i].backend)); | 352 REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfig
s[i].backend)); |
331 for (int j = 0; j < static_cast<int>(SK_ARRAY_COUNT(expectedConfigs[i].v
ias)); ++j) { | 353 for (int j = 0; j < static_cast<int>(SK_ARRAY_COUNT(expectedConfigs[i].v
ias)); ++j) { |
332 if (!expectedConfigs[i].vias[j]) { | 354 if (!expectedConfigs[i].vias[j]) { |
333 REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == j
); | 355 REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == j
); |
334 break; | 356 break; |
335 } | 357 } |
336 REPORTER_ASSERT(reporter, | 358 REPORTER_ASSERT(reporter, |
337 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 359 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
338 } | 360 } |
339 } | 361 } |
340 } | 362 } |
341 | 363 |
342 DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) { | 364 DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) { |
343 SkCommandLineFlags::StringArray config1 = make_string_array({ | 365 SkCommandLineFlags::StringArray config1 = make_string_array({ |
344 "zz-qq-gpu[api=gles]", | 366 "zz-qq-gpu[api=gles]", |
345 "abc-nbc-cbs-gpu[api=angle_d3d9_es2,samples=1]", | |
346 "a-gpu[samples=1", | 367 "a-gpu[samples=1", |
347 "abc-def-angle_gl_es2[samples=1]", | 368 "abc-def-angle-gl[samples=1]", |
348 }); | 369 }); |
349 | 370 |
350 SkCommandLineConfigArray configs; | 371 SkCommandLineConfigArray configs; |
351 ParseConfigs(config1, &configs); | 372 ParseConfigs(config1, &configs); |
352 const struct { | 373 const struct { |
353 const char* backend; | 374 const char* backend; |
354 const char* vias[3]; | 375 const char* vias[3]; |
355 } expectedConfigs[] = { | 376 } expectedConfigs[] = { |
356 #if SK_SUPPORT_GPU | 377 #if SK_SUPPORT_GPU |
357 {"gpu", {"zz", "qq", nullptr}}, | 378 {"gpu", {"zz", "qq", nullptr}}, |
358 {"gpu", {"abc", "nbc", "cbs"}}, | |
359 #else | 379 #else |
360 {"gpu[api=gles]", {"zz", "qq", nullptr}}, | 380 {"gpu[api=gles]", {"zz", "qq", nullptr}}, |
361 {"gpu[api=angle_d3d9_es2,samples=1]", {"abc", "nbc", "cbs"}}, | |
362 #endif | 381 #endif |
363 {"gpu[samples=1", {"a", nullptr, nullptr}}, // Missing bracket makes thi
s is not extended | 382 {"gpu[samples=1", {"a", nullptr, nullptr}}, // This is not extended form
, but via still |
364 // form but via still works
as expected. | 383 // works as expected. |
365 {"angle_gl_es2[samples=1]", {"abc", "def", nullptr}} // This is not ext
ended form. | 384 {"gl[samples=1]", {"abc", "def", "angle"}} // This is not extended form
. Also |
366 // angle_gl_es2 is
an api type not a | 385 // angle-gl is not a "backen
d" in this case. |
367 // backend. | |
368 }; | 386 }; |
369 for (int i = 0; i < config1.count(); ++i) { | 387 for (int i = 0; i < config1.count(); ++i) { |
370 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); | 388 REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i])); |
371 REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfig
s[i].backend)); | 389 REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfig
s[i].backend)); |
372 for (int j = 0; j < static_cast<int>(SK_ARRAY_COUNT(expectedConfigs[i].v
ias)); ++j) { | 390 for (int j = 0; j < static_cast<int>(SK_ARRAY_COUNT(expectedConfigs[i].v
ias)); ++j) { |
373 if (!expectedConfigs[i].vias[j]) { | 391 if (!expectedConfigs[i].vias[j]) { |
374 REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == | 392 REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == |
375 static_cast<int>(j)); | 393 static_cast<int>(j)); |
376 break; | 394 break; |
377 } | 395 } |
378 REPORTER_ASSERT(reporter, | 396 REPORTER_ASSERT(reporter, |
379 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 397 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
380 } | 398 } |
381 } | 399 } |
382 #if SK_SUPPORT_GPU | 400 #if SK_SUPPORT_GPU |
383 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 401 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
384 REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()); | 402 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
385 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 403 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
386 REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu()); | |
387 #endif | 404 #endif |
388 } | 405 } |
OLD | NEW |