| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); | 119 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); |
| 120 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); | 120 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); |
| 121 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); | 121 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); |
| 122 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); | 122 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); |
| 123 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); | 123 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); |
| 124 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); | 124 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); |
| 125 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); | 125 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); |
| 126 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); | 126 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); |
| 127 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()); | 127 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()); |
| 128 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); | 128 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); |
| 129 REPORTER_ASSERT(reporter, as_CSB(configs[25]->asConfigGpu()->getColorSpace()
)->toXYZD50() == | 129 const SkMatrix44* srgbXYZ = as_CSB(srgbColorSpace)->toXYZD50(); |
| 130 as_CSB(srgbColorSpace)->toXYZD50()); | 130 SkASSERT(srgbXYZ); |
| 131 const SkMatrix44* config25XYZ = |
| 132 as_CSB(configs[25]->asConfigGpu()->getColorSpace())->toXYZD50(); |
| 133 SkASSERT(config25XYZ); |
| 134 REPORTER_ASSERT(reporter, *config25XYZ == *srgbXYZ); |
| 131 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kRGB
A_8888_SkColorType); | 135 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kRGB
A_8888_SkColorType); |
| 132 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srg
bColorSpace.get()); | 136 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srg
bColorSpace.get()); |
| 133 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); | 137 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); |
| 134 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()); | 138 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()); |
| 135 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); | 139 REPORTER_ASSERT(reporter, configs[41]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); |
| 136 REPORTER_ASSERT(reporter, as_CSB(configs[41]->asConfigGpu()->getColorSpace()
)->toXYZD50() != | 140 const SkMatrix44* config41XYZ = |
| 137 as_CSB(srgbColorSpace)->toXYZD50()); | 141 as_CSB(configs[41]->asConfigGpu()->getColorSpace())->toXYZD50(); |
| 142 SkASSERT(config41XYZ); |
| 143 REPORTER_ASSERT(reporter, *config41XYZ != *srgbXYZ); |
| 144 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() == |
| 145 GrContextFactory::kGL_ContextType); |
| 138 REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); | 146 REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorType() == kRGB
A_F16_SkColorType); |
| 139 REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace()); | 147 REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace()); |
| 140 REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); | 148 REPORTER_ASSERT(reporter, configs[42]->asConfigGpu()->getColorSpace()->gamma
IsLinear()); |
| 141 REPORTER_ASSERT(reporter, as_CSB(configs[42]->asConfigGpu()->getColorSpace()
)->toXYZD50() != | 149 REPORTER_ASSERT(reporter, *as_CSB(configs[42]->asConfigGpu()->getColorSpace(
))->toXYZD50() != |
| 142 as_CSB(srgbColorSpace)->toXYZD50()); | 150 *as_CSB(srgbColorSpace)->toXYZD50()); |
| 143 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() == | |
| 144 GrContextFactory::kGL_ContextType); | |
| 145 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced()); | 151 REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getUseInstanced()); |
| 146 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getContextType() == | 152 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getContextType() == |
| 147 GrContextFactory::kGL_ContextType); | 153 GrContextFactory::kGL_ContextType); |
| 148 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseInstanced()); | 154 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getUseInstanced()); |
| 149 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getSamples() == 4); | 155 REPORTER_ASSERT(reporter, configs[34]->asConfigGpu()->getSamples() == 4); |
| 150 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getContextType() == | 156 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getContextType() == |
| 151 GrContextFactory::kGL_ContextType); | 157 GrContextFactory::kGL_ContextType); |
| 152 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseInstanced()); | 158 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseInstanced()); |
| 153 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseDIText()); | 159 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getUseDIText()); |
| 154 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getSamples() == 4); | 160 REPORTER_ASSERT(reporter, configs[35]->asConfigGpu()->getSamples() == 4); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 391 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
| 386 } | 392 } |
| 387 } | 393 } |
| 388 #if SK_SUPPORT_GPU | 394 #if SK_SUPPORT_GPU |
| 389 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 395 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
| 390 REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()); | 396 REPORTER_ASSERT(reporter, configs[1]->asConfigGpu()); |
| 391 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 397 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
| 392 REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu()); | 398 REPORTER_ASSERT(reporter, !configs[3]->asConfigGpu()); |
| 393 #endif | 399 #endif |
| 394 } | 400 } |
| OLD | NEW |