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

Unified Diff: include/core/SkThread_platform.h

Issue 12699002: Upstream changes from Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fiex Created 7 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 | « include/core/SkRRect.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkThread_platform.h
diff --git a/include/core/SkThread_platform.h b/include/core/SkThread_platform.h
index 535a5c7101d0b77d586b1ce475a87e2397ec5dad..298e9cb16a49f6c1100c614bb69130386d2fc7ff 100644
--- a/include/core/SkThread_platform.h
+++ b/include/core/SkThread_platform.h
@@ -61,13 +61,14 @@ static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic
#define sk_atomic_inc(addr) android_atomic_inc(addr)
#define sk_atomic_add(addr, inc) android_atomic_add(inc, addr)
#define sk_atomic_dec(addr) android_atomic_dec(addr)
-void sk_membar_aquire__after_atomic_dec() {
+
+static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic_dec() {
//HACK: Android is actually using full memory barriers.
// Should this change, uncomment below.
//int dummy;
//android_atomic_aquire_store(0, &dummy);
}
-int32_t sk_atomic_conditional_inc(int32_t* addr) {
+static inline __attribute__((always_inline)) int32_t sk_atomic_conditional_inc(int32_t* addr) {
while (true) {
int32_t value = *addr;
if (value == 0) {
@@ -78,7 +79,7 @@ int32_t sk_atomic_conditional_inc(int32_t* addr) {
}
}
}
-void sk_membar_aquire__after_atomic_conditional_inc() {
+static inline __attribute__((always_inline)) void sk_membar_aquire__after_atomic_conditional_inc() {
//HACK: Android is actually using full memory barriers.
// Should this change, uncomment below.
//int dummy;
« no previous file with comments | « include/core/SkRRect.h ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698