diff options
author | scroggo <scroggo@google.com> | 2016-04-14 11:40:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-14 11:40:48 -0700 |
commit | d06920a29fe11c68bde2b93948ec99f277bb8459 (patch) | |
tree | ebe20f9cd4b63247d52fc555ca620accec5eabdd /src/gpu/GrGpu.cpp | |
parent | d5f2e2e7429b643943d2f8a532c65e2498223b5b (diff) |
Fixes for SkRWBuffer
Do not call SkBufferHead::validate in SkROBuffer's destructor, which
may be called in a separate thread from SkRWBuffer::append. validate()
reads SkBufferBlock::fUsed, and append() writes to it, resulting in
a data race.
Update some comments to be more clear about how it is safe to use
these classes across threads.
Test the readers in separate threads.
In addition, make sure it is safe to create a reader even when no
data has been appended. Add tests for this case.
Mark a parameter to SkBufferHead::validate() as const, reflecting
its use.
BUG=chromium:601578
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1871953002
Review URL: https://codereview.chromium.org/1871953002
Diffstat (limited to 'src/gpu/GrGpu.cpp')
0 files changed, 0 insertions, 0 deletions