Revert of Force SkPath::getConvexity() cache for thread safety. (patchset #1 id:1...
authormtklein <mtklein@google.com>
Fri, 2 Sep 2016 13:51:57 +0000 (06:51 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 2 Sep 2016 13:51:57 +0000 (06:51 -0700)
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
src/core/SkRecords.cpp

index 3b94d8d..eaa5a79 100644 (file)
@@ -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(); }
 }
 
index 555f992..81dd92f 100644 (file)
@@ -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);