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