diff options
author | Brian Osman <brianosman@google.com> | 2018-03-01 10:49:26 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-01 18:34:35 +0000 |
commit | 44b61204d9f5681b9474db017577d56f42a32d66 (patch) | |
tree | 1335301b126893cb221353e5f34984c4a1702ad3 /tools/flags | |
parent | d50a193d8db74b8271a46fbd5ccf2a0681921a88 (diff) |
Add 1010102 support to Ganesh
Adds gl1010102, gles1010102, vk1010102, and mtl1010102
configs to DM.
This uses the same saveLayer approach as CPU, switching
to 8888 so that we have enough alpha precision.
Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb
Reviewed-on: https://skia-review.googlesource.com/110500
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/flags')
-rw-r--r-- | tools/flags/SkCommonFlagsConfig.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp index f9988f8769..7ff6ce6849 100644 --- a/tools/flags/SkCommonFlagsConfig.cpp +++ b/tools/flags/SkCommonFlagsConfig.cpp @@ -46,9 +46,11 @@ static const struct { { "gl4444", "gpu", "api=gl,color=4444" }, { "gl565", "gpu", "api=gl,color=565" }, { "glf16", "gpu", "api=gl,color=f16" }, + { "gl1010102", "gpu", "api=gl,color=1010102" }, { "glsrgb", "gpu", "api=gl,color=srgb" }, { "glsrgbnl", "gpu", "api=gl,color=srgbnl" }, { "glesf16", "gpu", "api=gles,color=f16" }, + { "gles1010102", "gpu", "api=gles,color=1010102" }, { "glessrgb", "gpu", "api=gles,color=srgb" }, { "glessrgbnl", "gpu", "api=gles,color=srgbnl" }, { "glsrgb", "gpu", "api=gl,color=srgb" }, @@ -77,6 +79,7 @@ static const struct { { "mock", "gpu", "api=mock" } #ifdef SK_VULKAN ,{ "vk", "gpu", "api=vulkan" } + ,{ "vk1010102", "gpu", "api=vulkan,color=1010102" } ,{ "vksrgb", "gpu", "api=vulkan,color=srgb" } ,{ "vkwide", "gpu", "api=vulkan,color=f16_wide" } ,{ "vkmsaa4", "gpu", "api=vulkan,samples=4" } @@ -84,6 +87,7 @@ static const struct { #endif #ifdef SK_METAL ,{ "mtl", "gpu", "api=metal" } + ,{ "mtl1010102", "gpu", "api=metal,color=1010102" } ,{ "mtlsrgb", "gpu", "api=metal,color=srgb" } ,{ "mtlwide", "gpu", "api=metal,color=f16_wide" } ,{ "mtlmsaa4", "gpu", "api=metal,samples=4" } @@ -140,6 +144,7 @@ static const char configExtendedHelp[] = "\t\t4444\t\t\tLinear 4444.\n" "\t\t565\t\t\tLinear 565.\n" "\t\tf16{_gamut}\t\tLinear 16-bit floating point.\n" + "\t\t1010102\t\tLinear 1010102.\n" "\t\tsrgb{_gamut}\t\tsRGB 8888.\n" "\t gamut\ttype: string\tdefault: srgb.\n" "\t Select color gamut for f16 or sRGB format buffers.\n" @@ -321,6 +326,10 @@ static bool parse_option_gpu_color(const SkString& value, *alphaType = kOpaque_SkAlphaType; *outColorSpace = nullptr; return true; + } else if (value.equals("1010102")) { + *outColorType = kRGBA_1010102_SkColorType; + *outColorSpace = nullptr; + return true; } SkTArray<SkString> commands; |