| 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.h" | 9 #include "SkColorSpace.h" |
| 10 #include "Test.h" | 10 #include "Test.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu")); | 40 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu")); |
| 41 REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0); | 41 REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0); |
| 42 #if SK_SUPPORT_GPU | 42 #if SK_SUPPORT_GPU |
| 43 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 43 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
| 44 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() | 44 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() |
| 45 == GrContextFactory::kNativeGL_ContextType); | 45 == GrContextFactory::kNativeGL_ContextType); |
| 46 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false); | 46 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false); |
| 47 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseInstanced() == fa
lse); | 47 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseInstanced() == fa
lse); |
| 48 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false
); | 48 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false
); |
| 49 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0); | 49 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0); |
| 50 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kN32_
SkColorType); | 50 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kRGBA
_8888_SkColorType); |
| 51 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == null
ptr); | 51 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorSpace() == null
ptr); |
| 52 #endif | 52 #endif |
| 53 } | 53 } |
| 54 | 54 |
| 55 DEF_TEST(ParseConfigs_OutParam, reporter) { | 55 DEF_TEST(ParseConfigs_OutParam, reporter) { |
| 56 // Clears the out parameter. | 56 // Clears the out parameter. |
| 57 SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"}); | 57 SkCommandLineFlags::StringArray config1 = make_string_array({"gpu"}); |
| 58 SkCommandLineConfigArray configs; | 58 SkCommandLineConfigArray configs; |
| 59 ParseConfigs(config1, &configs); | 59 ParseConfigs(config1, &configs); |
| 60 REPORTER_ASSERT(reporter, configs.count() == 1); | 60 REPORTER_ASSERT(reporter, configs.count() == 1); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 REPORTER_ASSERT(reporter, | 396 REPORTER_ASSERT(reporter, |
| 397 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 397 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 #if SK_SUPPORT_GPU | 400 #if SK_SUPPORT_GPU |
| 401 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 401 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
| 402 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); | 402 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
| 403 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 403 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
| 404 #endif | 404 #endif |
| 405 } | 405 } |
| OLD | NEW |