Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: src/pathops/SkOpSegment.h

Issue 257773007: pathops debug globals use atomic increment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpSegment.h
diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h
index b6eab86a7fbfa39cdc668c60ea1cb46eb3a68c38..1eaef69847fdde200bb176255d69c016f4e1da05 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -14,13 +14,17 @@
#include "SkTArray.h"
#include "SkTDArray.h"
+#if defined(SK_DEBUG) || !FORCE_RELEASE
+#include "SkThread.h"
+#endif
+
class SkPathWriter;
class SkOpSegment {
public:
SkOpSegment() {
#if defined(SK_DEBUG) || !FORCE_RELEASE
- fID = ++SkPathOpsDebug::gSegmentID;
+ fID = sk_atomic_inc(&SkPathOpsDebug::gSegmentID);
#endif
}
« no previous file with comments | « src/pathops/SkOpContour.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698