R=mtklein@google.com, reed@google.com, scroggo@google.com
Review URL: https://codereview.chromium.org/
398153002
'IGNORE_ROT_AA_RECT_OPT',
'SkLONGLONG int64_t',
'SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)',
- 'SK_ATOMICS_PLATFORM_H "../../src/ports/SkAtomics_sync.h"',
- 'SK_MUTEX_PLATFORM_H "../../src/ports/SkMutex_pthread.h"',
# Transitional, for deprecated SkCanvas::SaveFlags methods.
'SK_ATTR_DEPRECATED=SK_NOTHING_ARG1',
'SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)',
}
static inline __attribute__((always_inline)) int64_t sk_atomic_inc(int64_t* addr) {
+#if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) && defined(__mips__) && !defined(__LP64__)
+ /** The 32-bit MIPS toolchain for the android framework is missing support
+ * for __sync* functions that operate on 64-bit values. The workaround is
+ * to use __atomic* functions until we can move everything to <stdatomic.h>.
+ */
+ return __atomic_fetch_add(addr, 1, __ATOMIC_SEQ_CST);
+#else
return __sync_fetch_and_add(addr, 1);
+#endif
}
static inline __attribute__((always_inline)) int32_t sk_atomic_add(int32_t* addr, int32_t inc) {