aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkStrokerPriv.h
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-07-31 12:42:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-31 17:21:52 +0000
commitd9b6773052951b86b20f4ff078920089d888a67c (patch)
tree01659c244d9cab52ca2fcd5bedd1eb688fdb8bd4 /src/core/SkStrokerPriv.h
parent972b2f6041e0b591d9556fc874c24562733c50ce (diff)
disable single threaded debugging code
Stroking has some debug code that is examined by StrokerTest.cpp; this test is not thread-safe. Chrome detects this in TSAN, so disable the test code in SkStroker.cpp the same way it is disabled in StrokerTest.cpp R=bsalomon@google.com Bug: 749315 Change-Id: I6e424648b4d28509789e3e4123112e0fc95e34ed Reviewed-on: https://skia-review.googlesource.com/28780 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'src/core/SkStrokerPriv.h')
-rw-r--r--src/core/SkStrokerPriv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkStrokerPriv.h b/src/core/SkStrokerPriv.h
index d008efa11a..f763805381 100644
--- a/src/core/SkStrokerPriv.h
+++ b/src/core/SkStrokerPriv.h
@@ -18,6 +18,9 @@
#define CUBIC_ARC_FACTOR ((SK_ScalarSqrt2 - SK_Scalar1) * 4 / 3)
+// this enables a global which is not thread-safe; doing so triggers a TSAN error in Chrome tests.
+#define QUAD_STROKE_APPROXIMATION 0 // set to 1 to enable additional debugging in StrokerTest.cpp
+
class SkStrokerPriv {
public:
typedef void (*CapProc)(SkPath* path,