aboutsummaryrefslogtreecommitdiff
path: root/tests/TableColorFilterTest.cpp
diff options
context:
space:
mode:
authorBrian Osman <brianosman@google.com>2019-01-03 12:43:05 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-01-04 14:32:06 +0000
commita9549ab31630fc244094e6f1692371cbaf87f666 (patch)
tree6e73625a282ce9a38838e35b5f5fafb1733ed00e /tests/TableColorFilterTest.cpp
parent48ce543defaddaaa3388bda3d65ca7933b106941 (diff)
downloadskqp-a9549ab31630fc244094e6f1692371cbaf87f666.tar.gz
Add SkColorSpace factory from 3x3 row-major gamut and transfer function
Moved named common transfer functions and gamuts to constexpr values in SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces. Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the new factory with the named values. Multiple clients want a way to extract named transfer function and gamut - this still doesn't provide that, but this may be a better path forward for honestly advertising how SkColorSpace works internally. Bug: skia: Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4 Reviewed-on: https://skia-review.googlesource.com/c/180360 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tests/TableColorFilterTest.cpp')
-rw-r--r--tests/TableColorFilterTest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/TableColorFilterTest.cpp b/tests/TableColorFilterTest.cpp
index 857aa7ed69..bb5df60b8b 100644
--- a/tests/TableColorFilterTest.cpp
+++ b/tests/TableColorFilterTest.cpp
@@ -17,8 +17,7 @@
DEF_TEST(TableColorFilter, r) {
// Using a wide source gamut will make saturated colors go well out of range of sRGB.
- auto rec2020 = SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
- SkColorSpace::kRec2020_Gamut);
+ auto rec2020 = SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB, SkNamedGamut::kRec2020);
sk_sp<SkColorFilter> to_srgb = SkToSRGBColorFilter::Make(rec2020);
// Any table will work fine here. An identity table makes testing easy.