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

Unified Diff: tools/flags/SkCommonFlagsConfig.cpp

Issue 1872283003: Vulkan config in dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/VkWrapTests.cpp ('k') | tools/gpu/GrContextFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommonFlagsConfig.cpp
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp
index 0847ae5b79ea268947ef0bf3c8633c0db754b37d..a0d1c77dd962bc594c7ef77a793e720051349ca6 100644
--- a/tools/flags/SkCommonFlagsConfig.cpp
+++ b/tools/flags/SkCommonFlagsConfig.cpp
@@ -44,6 +44,9 @@ static const char configHelp[] =
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
" hwui"
#endif
+#ifdef SK_VULKAN
+ " vk"
+#endif
" or use extended form 'backend(option=value,...)'.\n";
static const char configExtendedHelp[] =
@@ -72,6 +75,9 @@ static const char configExtendedHelp[] =
#if SK_MESA
"\t\tmesa\t\t\tUse MESA.\n"
#endif
+#ifdef SK_VULKAN
+ "\t\tvulkan\t\t\tUse Vulkan.\n"
+#endif
"\tcolor\ttype: string\tdefault: 8888.\n"
"\t Select framebuffer color format.\n"
"\t Options:\n"
@@ -117,6 +123,9 @@ static const char configExtendedHelp[] =
#if SK_MESA
"\tmesa \t= gpu(api=mesa)\n"
#endif
+#ifdef SK_VULKAN
+ "\vk \t= gpu(api=vulkan)\n"
+#endif
#endif
;
@@ -159,6 +168,10 @@ static const struct {
#if SK_MESA
, { "mesa", "gpu", "api=mesa" }
#endif
+#ifdef SK_VULKAN
+ , { "vk", "gpu", "api=vulkan" }
+#endif
+
#else
{ "", "", "" }
#endif
@@ -251,6 +264,12 @@ static bool parse_option_gpu_api(const SkString& value,
return true;
}
#endif
+#ifdef SK_VULKAN
+ if (value.equals("vulkan")) {
+ *outContextType = GrContextFactory::kVulkan_ContextType;
+ return true;
+ }
+#endif
return false;
}
static bool parse_option_gpu_color(const SkString& value,
« no previous file with comments | « tests/VkWrapTests.cpp ('k') | tools/gpu/GrContextFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698