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

Unified Diff: src/core/SkPixelRef.cpp

Issue 869443003: Don't require -DSK_USE_POSIX_THREADS. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « gyp/common_conditions.gypi ('k') | src/utils/SkCondVar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « gyp/common_conditions.gypi ('k') | src/utils/SkCondVar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698