diff options
author | Mike Klein <mtklein@chromium.org> | 2017-09-19 16:12:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-19 20:46:11 +0000 |
commit | 6c4ea7e8801c5b2b758c67d01e236da29292799b (patch) | |
tree | ba399fa6fb70fde0c2ad42c9dc88abffe5259153 /src/core/SkResourceCache.h | |
parent | 76399d1b4f987f99deae35d4608641a762c08645 (diff) |
Fix 3 related races in SkColorSpace.cpp.
As written one thread can be comparing against, say, gSRGB, while
another thread is initializing it. TSAN caught us.
To fix this, we funnel everything through a function that returns its
own local static, which is intialized on first use in a thread safe way.
Change-Id: I2b7aa4628daff0511ad969d9800d40d967e2938e
Reviewed-on: https://skia-review.googlesource.com/48761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/core/SkResourceCache.h')
0 files changed, 0 insertions, 0 deletions