aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkColorSpacePriv.h
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2018-06-19 16:00:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-19 21:15:18 +0000
commit0e4041f5c962dd16c4a69cbd9ff35685e9519ff3 (patch)
tree09b89a6f52f52082ee74d2f596f42750027678e8 /src/core/SkColorSpacePriv.h
parentc069a57301a468dbc45f3f3775b623e5532f9398 (diff)
update software DM/nanobench configs for color testing
- Rename 'srgbnl' to just 'srgb'. - Add 'narrow' and 'enarrow' for testing a gamut narrower than sRGB. Tested by running xfermodes2 in DM... all look different, what a mess. I also ran a few nanobenches and they seemed somewhat sane. Change-Id: Iacdc391dc0eef4153a76f5b4f78d72c57a4371ee Reviewed-on: https://skia-review.googlesource.com/135871 Commit-Queue: Mike Klein <mtklein@chromium.org> Auto-Submit: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core/SkColorSpacePriv.h')
-rw-r--r--src/core/SkColorSpacePriv.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/SkColorSpacePriv.h b/src/core/SkColorSpacePriv.h
index 2ec895fdb7..7742a8770a 100644
--- a/src/core/SkColorSpacePriv.h
+++ b/src/core/SkColorSpacePriv.h
@@ -16,7 +16,7 @@
static constexpr float gSRGB_toXYZD50[] {
0.4360747f, 0.3850649f, 0.1430804f, // Rx, Gx, Bx
- 0.2225045f, 0.7168786f, 0.0606169f, // Ry, Gy, Gz
+ 0.2225045f, 0.7168786f, 0.0606169f, // Ry, Gy, By
0.0139322f, 0.0971045f, 0.7141733f, // Rz, Gz, Bz
};
@@ -26,22 +26,29 @@ static constexpr float gAdobeRGB_toXYZD50[] {
// 0.31111, 0.62567, 0.06322,
// 0.01947, 0.06087, 0.74457,
SkFixedToFloat(0x9c18), SkFixedToFloat(0x348d), SkFixedToFloat(0x2631), // Rx, Gx, Bx
- SkFixedToFloat(0x4fa5), SkFixedToFloat(0xa02c), SkFixedToFloat(0x102f), // Ry, Gy, Gz
+ SkFixedToFloat(0x4fa5), SkFixedToFloat(0xa02c), SkFixedToFloat(0x102f), // Ry, Gy, By
SkFixedToFloat(0x04fc), SkFixedToFloat(0x0f95), SkFixedToFloat(0xbe9c), // Rz, Gz, Bz
};
static constexpr float gDCIP3_toXYZD50[] {
0.515102f, 0.291965f, 0.157153f, // Rx, Gx, Bx
- 0.241182f, 0.692236f, 0.0665819f, // Ry, Gy, Gz
+ 0.241182f, 0.692236f, 0.0665819f, // Ry, Gy, By
-0.00104941f, 0.0418818f, 0.784378f, // Rz, Gz, Bz
};
static constexpr float gRec2020_toXYZD50[] {
0.673459f, 0.165661f, 0.125100f, // Rx, Gx, Bx
- 0.279033f, 0.675338f, 0.0456288f, // Ry, Gy, Gz
+ 0.279033f, 0.675338f, 0.0456288f, // Ry, Gy, By
-0.00193139f, 0.0299794f, 0.797162f, // Rz, Gz, Bz
};
+// A gamut narrower than sRGB, useful for testing.
+static constexpr float gNarrow_toXYZD50[] {
+ 0.190974f, 0.404865f, 0.368380f,
+ 0.114746f, 0.582937f, 0.302318f,
+ 0.032925f, 0.153615f, 0.638669f,
+};
+
static constexpr SkColorSpaceTransferFn gSRGB_TransferFn =
{ 2.4f, 1.0f / 1.055f, 0.055f / 1.055f, 1.0f / 12.92f, 0.04045f, 0.0f, 0.0f };