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

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

Issue 2005863002: Add vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Allow creation of sRGB Vulkan context Created 4 years, 7 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 | « no previous file | tools/gpu/GrContextFactory.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 27 matching lines...) Expand all
38 #if SK_COMMAND_BUFFER 38 #if SK_COMMAND_BUFFER
39 " commandbuffer" 39 " commandbuffer"
40 #endif 40 #endif
41 #if SK_MESA 41 #if SK_MESA
42 " mesa" 42 " mesa"
43 #endif 43 #endif
44 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK 44 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
45 " hwui" 45 " hwui"
46 #endif 46 #endif
47 #ifdef SK_VULKAN 47 #ifdef SK_VULKAN
48 " vk" 48 " vk vksrgb"
49 #endif 49 #endif
50 " or use extended form 'backend(option=value,...)'.\n"; 50 " or use extended form 'backend(option=value,...)'.\n";
51 51
52 static const char configExtendedHelp[] = 52 static const char configExtendedHelp[] =
53 "Extended form: 'backend(option=value,...)'\n\n" 53 "Extended form: 'backend(option=value,...)'\n\n"
54 "Possible backends and options:\n" 54 "Possible backends and options:\n"
55 #if SK_SUPPORT_GPU 55 #if SK_SUPPORT_GPU
56 "\n" 56 "\n"
57 "gpu(api=string,color=string,dit=bool,nvpr=bool,samples=int)\tGPU backend\n" 57 "gpu(api=string,color=string,dit=bool,nvpr=bool,samples=int)\tGPU backend\n"
58 "\tapi\ttype: string\tdefault: native.\n" 58 "\tapi\ttype: string\tdefault: native.\n"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #endif 117 #endif
118 "\tangle-gl \t= gpu(api=angle-gl)\n" 118 "\tangle-gl \t= gpu(api=angle-gl)\n"
119 #endif 119 #endif
120 #if SK_COMMAND_BUFFER 120 #if SK_COMMAND_BUFFER
121 "\tcommandbuffer\t= gpu(api=commandbuffer)\n" 121 "\tcommandbuffer\t= gpu(api=commandbuffer)\n"
122 #endif 122 #endif
123 #if SK_MESA 123 #if SK_MESA
124 "\tmesa \t= gpu(api=mesa)\n" 124 "\tmesa \t= gpu(api=mesa)\n"
125 #endif 125 #endif
126 #ifdef SK_VULKAN 126 #ifdef SK_VULKAN
127 "\vk \t= gpu(api=vulkan)\n" 127 "\tvk \t= gpu(api=vulkan)\n"
128 "\tvksrgb \t= gpu(api=vulkan,color=srgb)\n"
128 #endif 129 #endif
129 #endif 130 #endif
130 ; 131 ;
131 132
132 DEFINE_extended_string(config, defaultConfigs, configHelp, configExtendedHelp); 133 DEFINE_extended_string(config, defaultConfigs, configHelp, configExtendedHelp);
133 134
134 static const struct { 135 static const struct {
135 const char* predefinedConfig; 136 const char* predefinedConfig;
136 const char* backend; 137 const char* backend;
137 const char* options; 138 const char* options;
(...skipping 25 matching lines...) Expand all
163 , { "angle-gl", "gpu", "api=angle-gl" } 164 , { "angle-gl", "gpu", "api=angle-gl" }
164 #endif 165 #endif
165 #if SK_COMMAND_BUFFER 166 #if SK_COMMAND_BUFFER
166 , { "commandbuffer", "gpu", "api=commandbuffer" } 167 , { "commandbuffer", "gpu", "api=commandbuffer" }
167 #endif 168 #endif
168 #if SK_MESA 169 #if SK_MESA
169 , { "mesa", "gpu", "api=mesa" } 170 , { "mesa", "gpu", "api=mesa" }
170 #endif 171 #endif
171 #ifdef SK_VULKAN 172 #ifdef SK_VULKAN
172 , { "vk", "gpu", "api=vulkan" } 173 , { "vk", "gpu", "api=vulkan" }
174 , { "vksrgb", "gpu", "api=vulkan,color=srgb" }
173 #endif 175 #endif
174 176
175 #else 177 #else
176 { "", "", "" } 178 { "", "", "" }
177 #endif 179 #endif
178 }; 180 };
179 181
180 SkCommandLineConfig::SkCommandLineConfig(const SkString& tag, const SkString& ba ckend, 182 SkCommandLineConfig::SkCommandLineConfig(const SkString& tag, const SkString& ba ckend,
181 const SkTArray<SkString>& viaParts) 183 const SkTArray<SkString>& viaParts)
182 : fTag(tag) 184 : fTag(tag)
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 if (extendedBackend.equals("gpu")) { 402 if (extendedBackend.equals("gpu")) {
401 parsedConfig = parse_command_line_config_gpu(tag, vias, extendedOpti ons); 403 parsedConfig = parse_command_line_config_gpu(tag, vias, extendedOpti ons);
402 } 404 }
403 #endif 405 #endif
404 if (!parsedConfig) { 406 if (!parsedConfig) {
405 parsedConfig = new SkCommandLineConfig(tag, simpleBackend, vias); 407 parsedConfig = new SkCommandLineConfig(tag, simpleBackend, vias);
406 } 408 }
407 outResult->emplace_back(parsedConfig); 409 outResult->emplace_back(parsedConfig);
408 } 410 }
409 } 411 }
OLDNEW
« no previous file with comments | « no previous file | tools/gpu/GrContextFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698