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 "Test.h" | 9 #include "Test.h" |
10 #include <initializer_list> | 10 #include <initializer_list> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 16); | 104 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getSamples() == 16); |
105 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseNVPR()); | 105 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseNVPR()); |
106 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseDIText()); | 106 REPORTER_ASSERT(reporter, configs[14]->asConfigGpu()->getUseDIText()); |
107 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getSamples() == 4); | 107 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getSamples() == 4); |
108 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); | 108 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseNVPR()); |
109 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); | 109 REPORTER_ASSERT(reporter, configs[15]->asConfigGpu()->getUseDIText()); |
110 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); | 110 REPORTER_ASSERT(reporter, !configs[16]->asConfigGpu()); |
111 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); | 111 REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu()); |
112 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); | 112 REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu()); |
113 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); | 113 REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); |
114 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu()); | 114 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); |
115 REPORTER_ASSERT(reporter, !configs[25]->asConfigGpu()); | 115 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() |
| 116 == kRGBA_F16_SkColorType); |
| 117 REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getProfileType() |
| 118 == kLinear_SkColorProfileType); |
116 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() | 119 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() |
117 == kRGBA_F16_SkColorType); | 120 == kN32_SkColorType); |
118 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getProfileType() | 121 REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getProfileType() |
119 == kLinear_SkColorProfileType); | |
120 REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getColorType() | |
121 == kN32_SkColorType); | |
122 REPORTER_ASSERT(reporter, configs[27]->asConfigGpu()->getProfileType() | |
123 == kSRGB_SkColorProfileType); | 122 == kSRGB_SkColorProfileType); |
124 #if SK_ANGLE | 123 #if SK_ANGLE |
125 #ifdef SK_BUILD_FOR_WIN | 124 #ifdef SK_BUILD_FOR_WIN |
| 125 REPORTER_ASSERT(reporter, configs[20]->asConfigGpu()); |
| 126 #else |
| 127 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu()); |
| 128 #endif |
126 REPORTER_ASSERT(reporter, configs[21]->asConfigGpu()); | 129 REPORTER_ASSERT(reporter, configs[21]->asConfigGpu()); |
127 #else | 130 #else |
| 131 REPORTER_ASSERT(reporter, !configs[20]->asConfigGpu()); |
128 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu()); | 132 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu()); |
129 #endif | 133 #endif |
| 134 #if SK_COMMAND_BUFFER |
130 REPORTER_ASSERT(reporter, configs[22]->asConfigGpu()); | 135 REPORTER_ASSERT(reporter, configs[22]->asConfigGpu()); |
131 #else | 136 #else |
132 REPORTER_ASSERT(reporter, !configs[21]->asConfigGpu()); | |
133 REPORTER_ASSERT(reporter, !configs[22]->asConfigGpu()); | 137 REPORTER_ASSERT(reporter, !configs[22]->asConfigGpu()); |
134 #endif | 138 #endif |
135 #if SK_COMMAND_BUFFER | 139 #if SK_MESA |
136 REPORTER_ASSERT(reporter, configs[23]->asConfigGpu()); | 140 REPORTER_ASSERT(reporter, configs[23]->asConfigGpu()); |
137 #else | 141 #else |
138 REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu()); | 142 REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu()); |
139 #endif | 143 #endif |
140 #if SK_MESA | |
141 REPORTER_ASSERT(reporter, configs[24]->asConfigGpu()); | |
142 #else | |
143 REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); | |
144 #endif | |
145 #endif | 144 #endif |
146 } | 145 } |
147 | 146 |
148 DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { | 147 DEF_TEST(ParseConfigs_ExtendedGpuConfigsCorrect, reporter) { |
149 SkCommandLineFlags::StringArray config1 = make_string_array({ | 148 SkCommandLineFlags::StringArray config1 = make_string_array({ |
150 "gpu(nvpr=true,dit=false)", | 149 "gpu(nvpr=true,dit=false)", |
151 "gpu(api=angle)", | 150 "gpu(api=angle)", |
152 "gpu(api=angle-gl)", | 151 "gpu(api=angle-gl)", |
153 "gpu(api=mesa,samples=77)", | 152 "gpu(api=mesa,samples=77)", |
154 "gpu(dit=true,api=commandbuffer)", | 153 "gpu(dit=true,api=commandbuffer)", |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 REPORTER_ASSERT(reporter, | 326 REPORTER_ASSERT(reporter, |
328 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); | 327 configs[i]->getViaParts()[j].equals(expectedConfigs[
i].vias[j])); |
329 } | 328 } |
330 } | 329 } |
331 #if SK_SUPPORT_GPU | 330 #if SK_SUPPORT_GPU |
332 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); | 331 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); |
333 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); | 332 REPORTER_ASSERT(reporter, !configs[1]->asConfigGpu()); |
334 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); | 333 REPORTER_ASSERT(reporter, !configs[2]->asConfigGpu()); |
335 #endif | 334 #endif |
336 } | 335 } |
OLD | NEW |