aboutsummaryrefslogtreecommitdiff
path: root/dm/DM.cpp
diff options
context:
space:
mode:
authorBrian Osman <brianosman@google.com>2019-01-04 17:07:44 +0000
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2019-01-04 17:07:48 +0000
commitd4c7458f64270d605c04aa24e2171209c00a2d32 (patch)
tree7681c78cfa829800c9ec948a01091be073bdaa9d /dm/DM.cpp
parent1cefc0990debd8bb523f4cba166f647e5ff17ce0 (diff)
downloadskqp-d4c7458f64270d605c04aa24e2171209c00a2d32.tar.gz
Revert "Add SkColorSpace factory from 3x3 row-major gamut and transfer function"
This reverts commit a9549ab31630fc244094e6f1692371cbaf87f666. Reason for revert: SKPs changed? Original change's description: > 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> TBR=mtklein@google.com,brianosman@google.com,reed@google.com Change-Id: Ie888f877b3c1dba33e1a8c0f5fa92594628de7fb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/c/181300 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 6f63b369b6..1694676670 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -833,7 +833,7 @@ static bool gather_srcs() {
static sk_sp<SkColorSpace> rec2020() {
return SkColorSpace::MakeRGB({2.22222f, 0.909672f, 0.0903276f, 0.222222f, 0.0812429f, 0, 0},
- SkNamedGamut::kRec2020);
+ SkColorSpace::kRec2020_Gamut);
}
static void push_sink(const SkCommandLineConfig& config, Sink* s) {
@@ -925,10 +925,14 @@ static Sink* create_sink(const GrContextOptions& grCtxOptions, const SkCommandLi
// Configs relevant to color management testing (and 8888 for reference).
// 'narrow' has a gamut narrower than sRGB, and different transfer function.
- auto narrow = SkColorSpace::MakeRGB(SkNamedTransferFn::k2Dot2, gNarrow_toXYZD50),
+ SkMatrix44 narrow_gamut;
+ narrow_gamut.set3x3RowMajorf(gNarrow_toXYZD50);
+
+ auto narrow = SkColorSpace::MakeRGB(k2Dot2Curve_SkGammaNamed, narrow_gamut),
srgb = SkColorSpace::MakeSRGB(),
srgbLinear = SkColorSpace::MakeSRGBLinear(),
- p3 = SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB, SkNamedGamut::kDCIP3);
+ p3 = SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
+ SkColorSpace::kDCIP3_D65_Gamut);
SINK( "f16", RasterSink, kRGBA_F16_SkColorType, srgbLinear);
SINK( "srgb", RasterSink, kRGBA_8888_SkColorType, srgb );
@@ -954,7 +958,8 @@ static Sink* create_via(const SkString& tag, Sink* wrapped) {
#define VIA(t, via, ...) if (tag.equals(t)) return new via(__VA_ARGS__)
VIA("gbr", ViaCSXform, wrapped, rgb_to_gbr(), true);
VIA("p3", ViaCSXform, wrapped,
- SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB, SkNamedGamut::kDCIP3), false);
+ SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
+ SkColorSpace::kDCIP3_D65_Gamut), false);
VIA("lite", ViaLite, wrapped);
#ifdef TEST_VIA_SVG
VIA("svg", ViaSVG, wrapped);