Index: src/core/SkPixelRef.cpp |
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp |
index a2c37c6e72f92de7ce16d301632dacdb6dbb1fbf..bb4a5eff8882f6127d56ec8a0c9637b02b1639e0 100644 |
--- a/src/core/SkPixelRef.cpp |
+++ b/src/core/SkPixelRef.cpp |
@@ -8,8 +8,14 @@ |
#include "SkPixelRef.h" |
#include "SkThread.h" |
-#ifdef SK_USE_POSIX_THREADS |
+#ifdef SK_BUILD_FOR_WIN32 |
+ // We don't have SK_BASE_MUTEX_INIT on Windows. |
+ // must be a power-of-2. undef to just use 1 mutex |
+ #define PIXELREF_MUTEX_RING_COUNT 32 |
+ static SkBaseMutex gPixelRefMutexRing[PIXELREF_MUTEX_RING_COUNT]; |
+ |
+#else |
static SkBaseMutex gPixelRefMutexRing[] = { |
SK_BASE_MUTEX_INIT, SK_BASE_MUTEX_INIT, |
SK_BASE_MUTEX_INIT, SK_BASE_MUTEX_INIT, |
@@ -31,16 +37,9 @@ |
SK_BASE_MUTEX_INIT, SK_BASE_MUTEX_INIT, |
SK_BASE_MUTEX_INIT, SK_BASE_MUTEX_INIT, |
}; |
- |
// must be a power-of-2. undef to just use 1 mutex |
#define PIXELREF_MUTEX_RING_COUNT SK_ARRAY_COUNT(gPixelRefMutexRing) |
-#else // not pthreads |
- |
- // must be a power-of-2. undef to just use 1 mutex |
- #define PIXELREF_MUTEX_RING_COUNT 32 |
- static SkBaseMutex gPixelRefMutexRing[PIXELREF_MUTEX_RING_COUNT]; |
- |
#endif |
static SkBaseMutex* get_default_mutex() { |