Remove SkASSERT(fConvexity == kUnknown_Convexity) due to racing
Bug: skia:7822
Change-Id: I2def72a6d032c43376906d189e5ee834c76b0898
Reviewed-on: https://skia-review.googlesource.com/123749
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
Auto-Submit: Yuqian Li <liyuqian@google.com>
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index d2eb10c..497037a 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2431,7 +2431,11 @@
};
SkPath::Convexity SkPath::internalGetConvexity() const {
- SkASSERT(kUnknown_Convexity == fConvexity);
+ // Sometimes we think we need to calculate convexity but another thread already did.
+ for (auto c = (Convexity)fConvexity; c != kUnknown_Convexity; ) {
+ return c;
+ }
+
SkPoint pts[4];
SkPath::Verb verb;
SkPath::Iter iter(*this, true);