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 | 9 |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 static bool parse_option_gpu_color(const SkString& value, | 277 static bool parse_option_gpu_color(const SkString& value, |
278 SkColorType* outColorType, | 278 SkColorType* outColorType, |
279 sk_sp<SkColorSpace>* outColorSpace) { | 279 sk_sp<SkColorSpace>* outColorSpace) { |
280 if (value.equals("8888")) { | 280 if (value.equals("8888")) { |
281 *outColorType = kN32_SkColorType; | 281 *outColorType = kN32_SkColorType; |
282 *outColorSpace = nullptr; | 282 *outColorSpace = nullptr; |
283 return true; | 283 return true; |
284 } | 284 } |
285 if (value.equals("f16")) { | 285 if (value.equals("f16")) { |
286 *outColorType = kRGBA_F16_SkColorType; | 286 *outColorType = kRGBA_F16_SkColorType; |
287 *outColorSpace = nullptr; | 287 *outColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
288 return true; | 288 return true; |
289 } | 289 } |
290 if (value.equals("srgb")) { | 290 if (value.equals("srgb")) { |
291 *outColorType = kN32_SkColorType; | 291 *outColorType = kN32_SkColorType; |
292 *outColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); | 292 *outColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
293 return true; | 293 return true; |
294 } | 294 } |
295 return false; | 295 return false; |
296 } | 296 } |
297 | 297 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 if (extendedBackend.equals("gpu")) { | 402 if (extendedBackend.equals("gpu")) { |
403 parsedConfig = parse_command_line_config_gpu(tag, vias, extendedOpti
ons); | 403 parsedConfig = parse_command_line_config_gpu(tag, vias, extendedOpti
ons); |
404 } | 404 } |
405 #endif | 405 #endif |
406 if (!parsedConfig) { | 406 if (!parsedConfig) { |
407 parsedConfig = new SkCommandLineConfig(tag, simpleBackend, vias); | 407 parsedConfig = new SkCommandLineConfig(tag, simpleBackend, vias); |
408 } | 408 } |
409 outResult->emplace_back(parsedConfig); | 409 outResult->emplace_back(parsedConfig); |
410 } | 410 } |
411 } | 411 } |
OLD | NEW |