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

Unified Diff: include/core/SkAtomics.h

Issue 1264103003: Parallel cache - preliminary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove atomics from skglyph Created 5 years, 3 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 | « no previous file | include/ports/SkAtomics_atomic.h » ('j') | src/core/SkGlyphCache.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkAtomics.h
diff --git a/include/core/SkAtomics.h b/include/core/SkAtomics.h
index d31d9c64fb40ce13a20cc7db9a3e485bae0576d0..d03fc3235ca73e2276e0fa0e7b71369c996a44d2 100644
--- a/include/core/SkAtomics.h
+++ b/include/core/SkAtomics.h
@@ -58,6 +58,10 @@ public:
return sk_atomic_fetch_add(&fVal, val, mo);
}
+ T fetch_sub(const T& val, sk_memory_order mo = sk_memory_order_seq_cst) {
+ return sk_atomic_fetch_sub(&fVal, val, mo);
+ }
+
bool compare_exchange(T* expected, const T& desired,
sk_memory_order success = sk_memory_order_seq_cst,
sk_memory_order failure = sk_memory_order_seq_cst) {
« no previous file with comments | « no previous file | include/ports/SkAtomics_atomic.h » ('j') | src/core/SkGlyphCache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698