aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/TestConfigParsing.cpp
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-03-01 12:53:06 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-01 12:53:06 -0800
commita6f58194733c1c50e4fe5f98585e42344f29b6f0 (patch)
tree788d199ef37b8596e5be52bb94b32208282afbc9 /tests/TestConfigParsing.cpp
parent4bc31815ba1aa42ea13c5637c6b52262422b7bdb (diff)
Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pixel config, which makes many things "just work".
Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16, gpusrgb, and anglesrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750383002 Review URL: https://codereview.chromium.org/1750383002
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r--tests/TestConfigParsing.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index f1f353edb2..e456c2e3b2 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -43,6 +43,9 @@ DEF_TEST(ParseConfigs_Gpu, reporter) {
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false);
REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0);
+ REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getColorType() == kN32_SkColorType);
+ REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getProfileType()
+ == kLinear_SkColorProfileType);
#endif
}
@@ -65,7 +68,8 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
SkCommandLineFlags::StringArray config1 = make_string_array({
"565", "8888", "debug", "gpu", "gpudebug", "gpudft", "gpunull", "msaa16", "msaa4",
"nonrendering", "null", "nullgpu", "nvprmsaa16", "nvprmsaa4", "pdf", "pdf_poppler",
- "skp", "svg", "xps", "angle", "angle-gl", "commandbuffer", "mesa", "hwui"
+ "skp", "svg", "xps", "angle", "angle-gl", "commandbuffer", "mesa", "hwui",
+ "gpuf16", "gpusrgb", "anglesrgb"
});
SkCommandLineConfigArray configs;
@@ -101,11 +105,22 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) {
REPORTER_ASSERT(reporter, !configs[17]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[18]->asConfigGpu());
REPORTER_ASSERT(reporter, !configs[23]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[24]->asConfigGpu()->getColorType()
+ == kRGBA_F16_SkColorType);
+ REPORTER_ASSERT(reporter, configs[24]->asConfigGpu()->getProfileType()
+ == kLinear_SkColorProfileType);
+ REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType()
+ == kN32_SkColorType);
+ REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getProfileType()
+ == kSRGB_SkColorProfileType);
#if SK_ANGLE
#ifdef SK_BUILD_FOR_WIN
REPORTER_ASSERT(reporter, configs[19]->asConfigGpu());
+ REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getProfileType()
+ == kSRGB_SkColorProfileType);
#else
REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu());
+ REPORTER_ASSERT(reporter, !configs[26]->asConfigGpu());
#endif
REPORTER_ASSERT(reporter, configs[20]->asConfigGpu());
#else