Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: tools/flags/SkCommonFlagsConfig.cpp

Issue 2177193004: Always supply a color space (sRGB for now) with F16 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix uploading of F16 textures with color spaces Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/TestConfigParsing.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « tests/TestConfigParsing.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698