1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkCommonFlagsConfig.h"
#include "SkColorSpace_Base.h"
#include "Test.h"
#include <initializer_list>
using sk_gpu_test::GrContextFactory;
namespace {
// The code
// SkCommandLineFlags::StringArray FLAGS_config1 = make_string_array({"a", "b"})
// can be used to construct string array that one gets with command line flags.
// For example, the call above is equivalent of
// DEFINE_string(config1, "a b", "");
// in cases where the default command line flag value ("a b") is used.
// make_string_array can be used to construct StringArray strings that have spaces in
// them.
SkCommandLineFlags::StringArray make_string_array(std::initializer_list<const char*> strings) {
SkTArray<SkString> array;
for (auto& s : strings) {
array.push_back(SkString(s));
}
return SkCommandLineFlags::StringArray(array);
}
}
DEF_TEST(ParseConfigs_Gpu, reporter) {
// Parses a normal config and returns correct "tag".
// Gpu config defaults work.
SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu"));
REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0);
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType()
== GrContextFactory::kNativeGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseInstanced() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == nullptr);
#endif
}
DEF_TEST(ParseConfigs_OutParam, reporter) {
// Clears the out parameter.
SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu"));
SkCommandLineFlags::StringArray config2 = make_string_array({"8888"});
ParseConfigs(config2, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
REPORTER_ASSERT(reporter, configs[0]->getTag().equals("8888"));
SkCommandLineFlags::StringArray config3 = make_string_array({"gl"});
ParseConfigs(config3, &configs);
REPORTER_ASSERT(reporter, configs.count() == 1);
REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gl"));
}
DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
// Parses all default configs and returns correct "tag".
SkCommandLineFlags::StringArray config1 = make_string_array({
"565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16", "msaa4",
"nonrendering", "null", "nullgpu", "nvpr16", "nvpr4", "nvprdit16", "nvprdit4", "pdf", "skp",
"svg", "xps", "angle_d3d11_es2", "angle_gl_es2", "commandbuffer", "mesa", "hwui", "gpuf16",
"gpusrgb", "gl", "glnvpr4", "glnvprdit4", "glsrgb", "glmsaa4", "vk", "glinst", "glinst4",
"glinstdit4", "glinst16", "glinstdit16", "esinst", "esinst4", "esinstdit4", "glwide",
"glnarrow"
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
auto srgbColorSpace = SkColorSpace::MakeNamed(SkColorSpace::kSRGB_Named);
REPORTER_ASSERT(reporter, configs.count() == config1.count());
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == 0);
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[3]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[4]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[6]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[8]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, !configs[9]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[10]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[11]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[12]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[12]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[12]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[13]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[13]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[13]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace());
REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gammaIsLinear());
const SkMatrix44* srgbXYZ = as_CSB(srgbColorSpace)->toXYZD50();
SkASSERT(srgbXYZ);
const SkMatrix44* config25XYZ =
as_CSB(configs[25]->asConfigGpu()->getColorSpace())->toXYZD50();
SkASSERT(config25XYZ);
REPORTER_ASSERT(reporter, *config25XYZ == *srgbXYZ);
REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace());
REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gammaIsLinear());
const SkMatrix44* config41XYZ =
as_CSB(configs[41]->asConfigGpu()->getColorSpace())->toXYZD50();
SkASSERT(config41XYZ);
REPORTER_ASSERT(reporter, *config41XYZ != *srgbXYZ);
REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType);
REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace());
REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace()->gammaIsLinear());
REPORTER_ASSERT(reporter, *as_CSB(configs[42]->asConfigGpu()->getColorSpace())->toXYZD50() !=
*as_CSB(srgbColorSpace)->toXYZD50());
REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[36]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[37]->asConfigGpu()->getSamples() == 16);
REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getContextType() ==
GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, configs[38]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getContextType() ==
GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[39]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getContextType() ==
GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseInstanced());
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[40]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[20]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[21]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[22]->asConfigGpu());
#if SK_MESA
REPORTER_ASSERT(reporter, configs[23]->asConfigGpu());
#else
REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[27]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[28]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[28]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, configs[29]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getSamples() == 4);
REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, configs[29]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[30]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorType() == kRGBA_8888_SkColorType);
REPORTER_ASSERT(reporter, configs[30]->asConfigGpu()->getColorSpace() == srgbColorSpace.get());
REPORTER_ASSERT(reporter, configs[31]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[31]->asConfigGpu()->getSamples() == 4);
#ifdef SK_VULKAN
REPORTER_ASSERT(reporter, configs[32]->asConfigGpu());
#endif
#endif
}
DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"gpu[nvpr=true,dit=false]",
"gpu[api=angle_d3d9_es2]",
"gpu[api=angle_gl_es3]",
"gpu[api=mesa,samples=77]",
"gpu[dit=true,api=commandbuffer]",
"gpu[]",
"gpu[api=gles]",
"gpu[api=gl]",
"gpu[api=vulkan]",
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == config1.count());
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() ==
GrContextFactory::kNativeGL_ContextType);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[0]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()->getContextType() ==
GrContextFactory::kANGLE_D3D9_ES2_ContextType);
REPORTER_ASSERT(reporter, configs[1]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu()->getContextType() ==
GrContextFactory::kANGLE_GL_ES3_ContextType);
REPORTER_ASSERT(reporter, configs[2]->asConfigGpu());
#if SK_MESA
REPORTER_ASSERT(reporter, configs[3]->asConfigGpu()->getContextType() ==
GrContextFactory::kMESA_ContextType);
#else
REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[4]->asConfigGpu()->getContextType() ==
GrContextFactory::kCommandBuffer_ContextType);
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getContextType() ==
GrContextFactory::kNativeGL_ContextType);
REPORTER_ASSERT(reporter, !configs[5]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[5]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[5]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[6]->asConfigGpu()->getContextType() ==
GrContextFactory::kGLES_ContextType);
REPORTER_ASSERT(reporter, !configs[6]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[6]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[6]->asConfigGpu()->getSamples() == 0);
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getContextType() ==
GrContextFactory::kGL_ContextType);
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0);
#ifdef SK_VULKAN
REPORTER_ASSERT(reporter, configs[8]->asConfigGpu()->getContextType() ==
GrContextFactory::kVulkan_ContextType);
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseNVPR());
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0);
#endif
#endif
}
DEF_TEST(ParseConfigs_ExtendedGpuConfigsIncorrect, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"gpu[nvpr=1]", // Number as bool.
"gpu[api=gl,]", // Trailing in comma.
"gpu[api=angle_glu]", // Unknown api.
"gpu[api=,samples=0]", // Empty api.
"gpu[samples=true]", // Value true as a number.
"gpu[samples=0,samples=0]", // Duplicate option key.
"gpu[,samples=0]", // Leading comma.
"gpu[samples=54", // Missing closing parenthesis.
",,",
"gpu[", // Missing bracket.
"samples=54" // No backend.
"gpu[nvpr=true ]", // Space.
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == config1.count());
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(config1[i]));
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, !configs[i]->asConfigGpu());
#endif
}
}
DEF_TEST(ParseConfigs_ExtendedGpuConfigsSurprises, reporter) {
// These just list explicitly some properties of the system.
SkCommandLineFlags::StringArray config1 = make_string_array({
// Options are not canonized -> two same configs have a different tag.
"gpu[nvpr=true,dit=true]", "gpu[dit=true,nvpr=true]",
"gpu[api=debug]", "gpu[api=gl]", "gpu[api=gles]", ""
"gpu", "gpu[]", "gpu[samples=0]", "gpu[api=gles,samples=0]"
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
REPORTER_ASSERT(reporter, configs.count() == config1.count());
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[i]->getBackend().equals("gpu"));
REPORTER_ASSERT(reporter, configs[i]->asConfigGpu());
#else
REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(config1[i]));
#endif
}
}
DEF_TEST(ParseConfigs_ViaParsing, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"a-b-c-8888",
"zz-qq-gpu",
"a-angle_gl_es2"
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
const struct {
const char* backend;
const char* vias[3];
} expectedConfigs[] = {
{"8888", {"a", "b", "c"}},
{"gpu", {"zz", "qq", nullptr}},
{"gpu", { "a", nullptr, nullptr }}
};
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfigs[i].backend));
for (int j = 0; j < static_cast<int>(SK_ARRAY_COUNT(expectedConfigs[i].vias)); ++j) {
if (!expectedConfigs[i].vias[j]) {
REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() == j);
break;
}
REPORTER_ASSERT(reporter,
configs[i]->getViaParts()[j].equals(expectedConfigs[i].vias[j]));
}
}
}
DEF_TEST(ParseConfigs_ViaParsingExtendedForm, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"zz-qq-gpu[api=gles]",
"abc-nbc-cbs-gpu[api=angle_d3d9_es2,samples=1]",
"a-gpu[samples=1",
"abc-def-angle_gl_es2[samples=1]",
});
SkCommandLineConfigArray configs;
ParseConfigs(config1, &configs);
const struct {
const char* backend;
const char* vias[3];
} expectedConfigs[] = {
#if SK_SUPPORT_GPU
{"gpu", {"zz", "qq", nullptr}},
{"gpu", {"abc", "nbc", "cbs"}},
#else
{"gpu[api=gles]", {"zz", "qq", nullptr}},
{"gpu[api=angle_d3d9_es2,samples=1]", {"abc", "nbc", "cbs"}},
#endif
{"gpu[samples=1", {"a", nullptr, nullptr}}, // Missing bracket makes this is not extended
// form but via still works as expected.
{"angle_gl_es2[samples=1]", {"abc", "def", nullptr}} // This is not extended form.
// angle_gl_es2 is an api type not a
// backend.
};
for (int i = 0; i < config1.count(); ++i) {
REPORTER_ASSERT(reporter, configs[i]->getTag().equals(config1[i]));
REPORTER_ASSERT(reporter, configs[i]->getBackend().equals(expectedConfigs[i].backend));
for (int j = 0; j < static_cast<int>(SK_ARRAY_COUNT(expectedConfigs[i].vias)); ++j) {
if (!expectedConfigs[i].vias[j]) {
REPORTER_ASSERT(reporter, configs[i]->getViaParts().count() ==
static_cast<int>(j));
break;
}
REPORTER_ASSERT(reporter,
configs[i]->getViaParts()[j].equals(expectedConfigs[i].vias[j]));
}
}
#if SK_SUPPORT_GPU
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu());
REPORTER_ASSERT(reporter, configs[1]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu());
#endif
}
|