Simplify the operation on atomic fIsFinishing

Bug: skia:
Change-Id: I7ffe9bc11d211b0c1a4873b28ad4d0f574a6148b
Reviewed-on: https://skia-review.googlesource.com/121326
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
This commit is contained in:
Yuqian Li 2018-04-13 11:39:50 -04:00 committed by Skia Commit-Bot
parent 575c21bf74
commit 945918714b
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ void SkTaskGroup2D::addColumn() {
}
void SkTaskGroup2D::finish() {
fIsFinishing.store(true, std::memory_order_relaxed);
fIsFinishing = true;
fThreadsGroup->wait();
}

View File

@ -59,7 +59,7 @@ public:
void finish(); // wait and finish all tasks (no more tasks can be added after calling this)
SK_ALWAYS_INLINE bool isFinishing() const {
return fIsFinishing.load(std::memory_order_relaxed);
return fIsFinishing;
}
protected: