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

Unified Diff: src/core/SkTraceEvent.h

Issue 996763002: Clean up SkDynamicAnnotations. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: review Created 5 years, 9 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/core/SkLazyFnPtr.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTraceEvent.h
diff --git a/src/core/SkTraceEvent.h b/src/core/SkTraceEvent.h
index 2c3c9b41819be2851a4608b9b08d4e9bb42a9ee4..5d7617b32bbd378eabf5c26b273acf0247b84679 100644
--- a/src/core/SkTraceEvent.h
+++ b/src/core/SkTraceEvent.h
@@ -161,8 +161,8 @@
#ifndef SkTraceEvent_DEFINED
#define SkTraceEvent_DEFINED
+#include "SkAtomics.h"
#include "SkEventTracer.h"
-#include "SkDynamicAnnotations.h"
// By default, const char* argument values are assumed to have long-lived scope
// and will not be copied. Use this macro to force a const char* to be copied.
@@ -760,17 +760,10 @@
#define TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION \
SkEventTracer::GetInstance()->updateTraceEventDuration
-// These operations are atomic in the Chrome tracing implementation
-// to cater to ARM's weak memory consistency; we're just doing read/
-// write here because it's not strictly needed for correctness.
-// So says Nat.
-// FIXME
-//
-// Skia addition: we mark these as unprotected reads and writes to shut up TSAN.
-
#define TRACE_EVENT_API_ATOMIC_WORD intptr_t
-#define TRACE_EVENT_API_ATOMIC_LOAD(var) SK_ANNOTATE_UNPROTECTED_READ(var)
-#define TRACE_EVENT_API_ATOMIC_STORE(var, value) SK_ANNOTATE_UNPROTECTED_WRITE(&var, value)
+#define TRACE_EVENT_API_ATOMIC_LOAD(var) sk_atomic_load(&var, sk_memory_order_relaxed)
+#define TRACE_EVENT_API_ATOMIC_STORE(var, value) \
+ sk_atomic_store(&var, value, sk_memory_order_relaxed)
// Defines visibility for classes in trace_event.h
#define TRACE_EVENT_API_CLASS_EXPORT SK_API
« no previous file with comments | « src/core/SkLazyFnPtr.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698