Always force the bounds of the empty pathref.
Chrome's TSAN bots are seeing various races on the bounds of the empty path ref, and it's a simple fix to just force them on creation. In fact, we used to do this for this very reason, but for some reason it looks like I decided it wasn't necessary. Maybe not, but it certainly doesn't hurt, and it's nice to keep TSAN happy. Reminder to self: merge this into M39 branch too. BUG=418299 R=fmalita@chromium.org, robertphillips@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/603503003
This commit is contained in:
parent
aa0c837667
commit
51936a3f07
@ -30,7 +30,9 @@ SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef,
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SkPathRef* SkPathRef::CreateEmptyImpl() {
|
||||
return SkNEW(SkPathRef);
|
||||
SkPathRef* empty = SkNEW(SkPathRef);
|
||||
empty->computeBounds(); // Avoids races later to be the first to do this.
|
||||
return empty;
|
||||
}
|
||||
|
||||
SkPathRef* SkPathRef::CreateEmpty() {
|
||||
|
Loading…
Reference in New Issue
Block a user