| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); | 118 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); |
| 119 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); | 119 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); |
| 120 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); | 120 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); |
| 121 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); | 121 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); |
| 122 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); | 122 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); |
| 123 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); | 123 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); |
| 124 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); | 124 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); |
| 125 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); | 125 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); |
| 126 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()); | 126 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()); |
| 127 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); | 127 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); |
| 128 REPORTER_ASSERT(reporter, as_CSB(configs[25]->asConfigGpu()->getColorSpace()
)->toXYZD50() == | 128 const SkMatrix44* srgbXYZ = as_CSB(srgbColorSpace)->requestToXYZD50(); |
| 129 as_CSB(srgbColorSpace)->toXYZD50()); | 129 SkASSERT(srgbXYZ); |
| 130 const SkMatrix44* config25XYZ = |
| 131 as_CSB(configs[25]->asConfigGpu()->getColorSpace())->requestToXYZD50
(); |
| 132 SkASSERT(config25XYZ); |
| 133 REPORTER_ASSERT(reporter, *config25XYZ == *srgbXYZ); |
| 130 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kRGB
A_8888_SkColorType); | 134 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kRGB
A_8888_SkColorType); |
| 131 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srg
bColorSpace.get()); | 135 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srg
bColorSpace.get()); |
| 132 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); | 136 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); |
| 133 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()); | 137 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()); |
| 134 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); | 138 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); |
| 135 REPORTER_ASSERT(reporter, as_CSB(configs[41]->asConfigGpu()->getColorSpace()
)->toXYZD50() != | 139 const SkMatrix44* config41XYZ = |
| 136 as_CSB(srgbColorSpace)->toXYZD50()); | 140 as_CSB(configs[41]->asConfigGpu()->getColorSpace())->requestToXYZD50
(); |
| 141 SkASSERT(config41XYZ); |
| 142 REPORTER_ASSERT(reporter, *config41XYZ != *srgbXYZ); |
| 137 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() == | 143 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() == |
| 138 GrContextFactory::kGL_ContextType); | 144 GrContextFactory::kGL_ContextType); |
| 139 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced()); | 145 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced()); |
| 140 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getContextType() == | 146 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getContextType() == |
| 141 GrContextFactory::kGL_ContextType); | 147 GrContextFactory::kGL_ContextType); |
| 142 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseInstanced()); | 148 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseInstanced()); |
| 143 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getSamples() == 4); | 149 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getSamples() == 4); |
| 144 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getContextType() == | 150 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getContextType() == |
| 145 GrContextFactory::kGL_ContextType); | 151 GrContextFactory::kGL_ContextType); |
| 146 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseInstanced()); | 152 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseInstanced()); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 REPORTER_ASSERT(reporter, | 402 REPORTER_ASSERT(reporter, |
| 397 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 403 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
| 398 } | 404 } |
| 399 } | 405 } |
| 400 #if SK_SUPPORT_GPU | 406 #if SK_SUPPORT_GPU |
| 401 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 407 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
| 402 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); | 408 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
| 403 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 409 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
| 404 #endif | 410 #endif |
| 405 } | 411 } |
| OLD | NEW |