diff options
author | msarett <msarett@google.com> | 2016-08-23 14:36:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-23 14:36:20 -0700 |
commit | ae6377c08e5c3735c65212ba9ff86fa51af7d68a (patch) | |
tree | 57ae0f599ba46361bc14dccb7a89f8b4777afcb9 /tests/ColorSpaceTest.cpp | |
parent | 19fe41e85e6ce3e78b3a69fce1cf28edf937027d (diff) |
Make singleton SkColorSpaces thread safe
SkColorSpaces may be once-ptrs, so we can reuse common color spaces.
This means that they must be thread safe. SkMatrix44 is not
thread safe because it maintains a mutable type mask.
This CL ensures that we precompute the type mask so we
can use const SkMatrix44's safely.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277463002
Review-Url: https://codereview.chromium.org/2277463002
Diffstat (limited to 'tests/ColorSpaceTest.cpp')
-rw-r--r-- | tests/ColorSpaceTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp index abc02b74d8..393d75310b 100644 --- a/tests/ColorSpaceTest.cpp +++ b/tests/ColorSpaceTest.cpp @@ -24,7 +24,7 @@ static void test_space(skiatest::Reporter* r, SkColorSpace* space, REPORTER_ASSERT(r, expectedGamma == space->gammaNamed()); - SkMatrix44 mat = space->xyz(); + const SkMatrix44& mat = space->xyz(); const float src[] = { 1, 0, 0, 1, 0, 1, 0, 1, |