aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/flags
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-06-28 17:52:02 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-28 18:20:17 +0000
commita66f4dad515c4179132b85cf482189626f5bba80 (patch)
tree791f7c2ef73c446246e767c7605f4cc555d1c51e /tools/flags
parent1de4439313c275ffaf256091e6ba9f0b7a508107 (diff)
Revert "Reland "Revert "Update GPU DM/nanobench configs for color testing"""
This reverts commit d5161b9a62b6912105e7a49d06e5126bf4fa1f75. Reason for revert: This should be okay again. Original change's description: > Reland "Revert "Update GPU DM/nanobench configs for color testing"" > > This reverts commit c0fb3c8b9fea2f60062819e92a1fa7f0a1966fba. > > Reason for revert: Had to revert dependent CL. > Original change's description: > > Revert "Revert "Update GPU DM/nanobench configs for color testing"" > > > > This reverts commit 2a284de7a51c198096a6f34ec1cbfe9118db554c. > > > > Re-landing without esrgb configs. Going to enable those separately, > > as they require some blacklisting. > > > > Bug: skia: > > Change-Id: I2315849d4f5c45c2e5512f84f9f867d02ff6fe30 > > Reviewed-on: https://skia-review.googlesource.com/136589 > > Reviewed-by: Brian Osman <brianosman@google.com> > > Commit-Queue: Brian Osman <brianosman@google.com> > > TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com > > Change-Id: I942d4235c17100fd933bf9cbfe923e3ae80657b1 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/137721 > Reviewed-by: Brian Osman <brianosman@google.com> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I280dac49eb74d6c1cbf7c2f52a3f6a68fa2510ae Reviewed-on: https://skia-review.googlesource.com/138301 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/flags')
-rw-r--r--tools/flags/SkCommonFlagsConfig.cpp37
1 files changed, 24 insertions, 13 deletions
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp
index 0b7a74641c..aff7a3f960 100644
--- a/tools/flags/SkCommonFlagsConfig.cpp
+++ b/tools/flags/SkCommonFlagsConfig.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkColorSpacePriv.h"
#include "SkCommonFlagsConfig.h"
#include "SkImageInfo.h"
#include "SkTHash.h"
@@ -53,11 +54,15 @@ static const struct {
{ "gl1010102", "gpu", "api=gl,color=1010102" },
{ "gles1010102", "gpu", "api=gles,color=1010102" },
{ "glsrgb", "gpu", "api=gl,color=srgb" },
- { "glsrgbnl", "gpu", "api=gl,color=srgbnl" },
+ { "glesrgb", "gpu", "api=gl,color=esrgb" },
+ { "glnarrow", "gpu", "api=gl,color=narrow" },
+ { "glenarrow", "gpu", "api=gl,color=enarrow" },
{ "glf16", "gpu", "api=gl,color=f16" },
- { "glf16nl", "gpu", "api=gl,color=f16nl" },
{ "glessrgb", "gpu", "api=gles,color=srgb" },
- { "glessrgbnl", "gpu", "api=gles,color=srgbnl" },
+ { "glesesrgb", "gpu", "api=gles,color=esrgb" },
+ { "glesnarrow", "gpu", "api=gles,color=narrow" },
+ { "glesenarrow", "gpu", "api=gles,color=enarrow" },
+ { "glesf16", "gpu", "api=gles,color=f16" },
{ "glnostencils", "gpu", "api=gl,stencils=false" },
{ "gldft", "gpu", "api=gl,dit=true" },
{ "glesdft", "gpu", "api=gles,dit=true" },
@@ -82,6 +87,10 @@ static const struct {
,{ "vknostencils", "gpu", "api=vulkan,stencils=false" }
,{ "vk1010102", "gpu", "api=vulkan,color=1010102" }
,{ "vksrgb", "gpu", "api=vulkan,color=srgb" }
+ ,{ "vkesrgb", "gpu", "api=vulkan,color=esrgb" }
+ ,{ "vknarrow", "gpu", "api=vulkan,color=narrow" }
+ ,{ "vkenarrow", "gpu", "api=vulkan,color=enarrow" }
+ ,{ "vkf16", "gpu", "api=vulkan,color=f16" }
,{ "vkmsaa4", "gpu", "api=vulkan,samples=4" }
,{ "vkmsaa8", "gpu", "api=vulkan,samples=8" }
,{ "vkbetex", "gpu", "api=vulkan,surf=betex" }
@@ -141,10 +150,11 @@ static const char configExtendedHelp[] =
"\t\t4444\t\t\tLinear 4444.\n"
"\t\t565\t\t\tLinear 565.\n"
"\t\t1010102\t\t\tLinear 1010102.\n"
- "\t\tsrgb\t\t\tsRGB 8888 (Linear blending).\n"
- "\t\tsrgbnl\t\t\tsRGB 8888.\n"
- "\t\tf16\t\t\t16-bit floating point (Linear blending).\n"
- "\t\tf16nl\t\t\t16-bit floating point (sRGB encoded/blended).\n"
+ "\t\tsrgb\t\t\tsRGB 8888.\n"
+ "\t\tesrgb\t\t\tsRGB 16-bit floating point.\n"
+ "\t\tnarrow\t\t\tNarrow gamut 8888.\n"
+ "\t\tenarrow\t\t\tNarrow gamut 16-bit floating point.\n"
+ "\t\tf16\t\t\tLinearly blended 16-bit floating point.\n"
"\tdit\ttype: bool\tdefault: false.\n"
"\t Use device independent text.\n"
"\tnvpr\ttype: bool\tdefault: false.\n"
@@ -294,18 +304,19 @@ static bool parse_option_gpu_color(const SkString& value,
*outColorType = kRGBA_1010102_SkColorType;
*outColorSpace = nullptr;
} else if (value.equals("srgb")) {
- // TODO: kRGBA_sRGB_SkColorType, srgbLinearColorSpace
*outColorType = kRGBA_8888_SkColorType;
*outColorSpace = SkColorSpace::MakeSRGB();
- } else if (value.equals("srgbnl")) {
- *outColorType = kRGBA_8888_SkColorType;
+ } else if (value.equals("esrgb")) {
+ *outColorType = kRGBA_F16_SkColorType;
*outColorSpace = SkColorSpace::MakeSRGB();
+ } else if (value.equals("narrow") || value.equals("enarrow")) {
+ SkMatrix44 narrow_gamut(SkMatrix44::kUninitialized_Constructor);
+ narrow_gamut.set3x3RowMajorf(gNarrow_toXYZD50);
+ *outColorType = value.equals("narrow") ? kRGBA_8888_SkColorType : kRGBA_F16_SkColorType;
+ *outColorSpace = SkColorSpace::MakeRGB(k2Dot2Curve_SkGammaNamed, narrow_gamut);
} else if (value.equals("f16")) {
*outColorType = kRGBA_F16_SkColorType;
*outColorSpace = SkColorSpace::MakeSRGBLinear();
- } else if (value.equals("f16nl")) {
- *outColorType = kRGBA_F16_SkColorType;
- *outColorSpace = SkColorSpace::MakeSRGB();
} else {
return false;
}