diff options
author | 2016-08-30 07:07:59 -0700 | |
---|---|---|
committer | 2016-08-30 07:07:59 -0700 | |
commit | 0e22eb8e6efc7d7ab7a601ba555947916d139906 (patch) | |
tree | 8f4087433a195f8e874c0b83549552575cde0e75 /tests/TestConfigParsing.cpp | |
parent | 6f5df6acb7dec9788fe5d9c44f7892b896e21de3 (diff) |
Some tests around surface creation and snapshotting with color space
Verify the rules that we're converging on for surfaces:
- For 8888, we only support sRGB-like gamma, or no color space at all.
- For F16, we require a color space, with linear gamma.
- For all other formats, we do not support color spaces.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270823002
Review-Url: https://codereview.chromium.org/2270823002
Diffstat (limited to 'tests/TestConfigParsing.cpp')
-rw-r--r-- | tests/TestConfigParsing.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp index 6f5c64aa2e..1a7e5b94ab 100644 --- a/tests/TestConfigParsing.cpp +++ b/tests/TestConfigParsing.cpp @@ -123,7 +123,11 @@ DEF_TEST(ParseConfigs_DefaultConfigs, reporter) { REPORTER_ASSERT(reporter, !configs[19]->asConfigGpu()); REPORTER_ASSERT(reporter, !configs[24]->asConfigGpu()); REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorType() == kRGBA_F16_SkColorType); - REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace() == srgbColorSpace.get()); + REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()); + REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->gammaNamed() == + SkColorSpace::kLinear_GammaNamed); + REPORTER_ASSERT(reporter, configs[25]->asConfigGpu()->getColorSpace()->xyz() == + srgbColorSpace->xyz()); REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorType() == kN32_SkColorType); REPORTER_ASSERT(reporter, configs[26]->asConfigGpu()->getColorSpace() == srgbColorSpace.get()); REPORTER_ASSERT(reporter, configs[33]->asConfigGpu()->getContextType() == |