aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gamut.cpp
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-09-09 10:36:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-09 10:36:17 -0700
commitde68d6c4616d86621373d88100002ddfdb9c08e3 (patch)
treec3020d0d2ab8a4157beeab02fc32efc1518bb1e6 /gm/gamut.cpp
parent81a478ca6c36aac3e53ce0373a281ac8940f4780 (diff)
Fix storage of gamut transform matrices in SkColorSpace
We were effectively storing the transpose, which made all of our operations on individual colors, and our concatenation of matrices awkward and backwards. I'm planning to push this further into Ganesh, where I had incorrectly adjusted to the previous layout, treating colors as row vectors in the shaders. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324843003 Review-Url: https://codereview.chromium.org/2324843003
Diffstat (limited to 'gm/gamut.cpp')
-rw-r--r--gm/gamut.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/gamut.cpp b/gm/gamut.cpp
index a1bea3c54f..595e36b7d2 100644
--- a/gm/gamut.cpp
+++ b/gm/gamut.cpp
@@ -106,9 +106,9 @@ static void draw_gamut_grid(SkCanvas* canvas, SkTArray<SkAutoTDelete<CellRendere
// We want our colors in our wide gamut to be obviously visibly distorted from sRGB, so we use
// Wide Gamut RGB (with sRGB gamma, for HW acceleration) as the working space for this test:
const float gWideGamutRGB_toXYZD50[]{
- 0.7161046f, 0.2581874f, 0.0000000f, // * R
- 0.1009296f, 0.7249378f, 0.0517813f, // * G
- 0.1471858f, 0.0168748f, 0.7734287f, // * B
+ 0.7161046f, 0.1009296f, 0.1471858f, // -> X
+ 0.2581874f, 0.7249378f, 0.0168748f, // -> Y
+ 0.0000000f, 0.0517813f, 0.7734287f, // -> Z
};
SkMatrix44 wideGamutRGB_toXYZD50(SkMatrix44::kUninitialized_Constructor);