From df0e3ece70762fd4674e09e457e5accb4265995d Mon Sep 17 00:00:00 2001 From: mtklein Date: Fri, 2 Sep 2016 06:51:57 -0700 Subject: [PATCH] Revert of Force SkPath::getConvexity() cache for thread safety. (patchset #1 id:1 of https://codereview.chromium.org/2300003003/ ) Reason for revert: I don't see anything else in the roll that could have caused the diff. Original issue's description: > Force SkPath::getConvexity() cache for thread safety. > > I happened to stumble on this in a run of TSAN: > https://luci-milo.appspot.com/swarming/task/30fffe9497dc6310/steps/dm/0/stdout > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300003003 > > Committed: https://skia.googlesource.com/skia/+/d0634eeb565d706df2e148a33f137c6edf42bf2e TBR=reed@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2303303002 --- src/core/SkLiteDL.cpp | 5 +---- src/core/SkRecords.cpp | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/SkLiteDL.cpp b/src/core/SkLiteDL.cpp index 3b94d8d..eaa5a79 100644 --- a/src/core/SkLiteDL.cpp +++ b/src/core/SkLiteDL.cpp @@ -44,10 +44,7 @@ static D* pod(T* op, size_t offset = 0) { // Pre-cache lazy non-threadsafe fields on SkPath and/or SkMatrix. static void make_threadsafe(SkPath* path, SkMatrix* matrix) { - if (path) { - path->updateBoundsCache(); - (void)path->getConvexity(); - } + if (path) { path->updateBoundsCache(); } if (matrix) { (void)matrix->getType(); } } diff --git a/src/core/SkRecords.cpp b/src/core/SkRecords.cpp index 555f992..81dd92f 100644 --- a/src/core/SkRecords.cpp +++ b/src/core/SkRecords.cpp @@ -11,7 +11,6 @@ namespace SkRecords { PreCachedPath::PreCachedPath(const SkPath& path) : SkPath(path) { this->updateBoundsCache(); - (void)this->getConvexity(); #if 0 // Disabled to see if we ever really race on this. It costs time, chromium:496982. SkPathPriv::FirstDirection junk; (void)SkPathPriv::CheapComputeFirstDirection(*this, &junk); -- 2.7.4