aboutsummaryrefslogtreecommitdiff
path: root/tests/StringTest.cpp
diff options
context:
space:
mode:
authorscroggo <scroggo@google.com>2016-04-22 06:59:01 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-22 06:59:01 -0700
commit635164028594b4af0086ec85b5e4570dd11091da (patch)
tree4f1d3a0a5f6c11ace269cf6c99f9a8062e38b4e5 /tests/StringTest.cpp
parent488165e689baf0f215d5798c87d0031b58e4bc8d (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 BUG=chromium:605479 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 'tests/StringTest.cpp')
0 files changed, 0 insertions, 0 deletions