summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-04-28 17:55:10 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-04-28 17:55:10 +0200
commitdb4b6dc1dab3dd099c93253b96fbe8089c2f9e60 (patch)
tree1fe99704fb43e478d2f69af0aad76961394e29d1 /gfx
parent8d6b34f8630d6802e3570e8c6adcd2ad6fe4ddbe (diff)
downloadUXP-db4b6dc1dab3dd099c93253b96fbe8089c2f9e60.tar
UXP-db4b6dc1dab3dd099c93253b96fbe8089c2f9e60.tar.gz
UXP-db4b6dc1dab3dd099c93253b96fbe8089c2f9e60.tar.lz
UXP-db4b6dc1dab3dd099c93253b96fbe8089c2f9e60.tar.xz
UXP-db4b6dc1dab3dd099c93253b96fbe8089c2f9e60.zip
Use SRWlocks for mutexes in cairo on Windows.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/cairo/cairo/src/cairo-mutex-impl-private.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/gfx/cairo/cairo/src/cairo-mutex-impl-private.h b/gfx/cairo/cairo/src/cairo-mutex-impl-private.h
index 25223f3ea..6c67f6ebb 100644
--- a/gfx/cairo/cairo/src/cairo-mutex-impl-private.h
+++ b/gfx/cairo/cairo/src/cairo-mutex-impl-private.h
@@ -36,6 +36,7 @@
* Carl D. Worth <cworth@cworth.org>
* Mathias Hasselmann <mathias.hasselmann@gmx.de>
* Behdad Esfahbod <behdad@behdad.org>
+ * Mark Straver <moonchild@palemoon.org>
*/
#ifndef CAIRO_MUTEX_IMPL_PRIVATE_H
@@ -178,24 +179,24 @@
#elif defined(_WIN32) /******************************************************/
#define WIN32_LEAN_AND_MEAN
-/* We require Windows 2000 features such as ETO_PDY */
-#if !defined(WINVER) || (WINVER < 0x0500)
-# define WINVER 0x0500
+/* We require Windows 7 features */
+#if !defined(WINVER) || (WINVER < 0x0601)
+# define WINVER 0x0601
#endif
-#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
-# define _WIN32_WINNT 0x0500
+#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0601)
+# define _WIN32_WINNT 0x0601
#endif
# include <windows.h>
- typedef CRITICAL_SECTION cairo_mutex_impl_t;
+ typedef SRWLOCK cairo_mutex_impl_t;
# define CAIRO_MUTEX_IMPL_WIN32 1
-# define CAIRO_MUTEX_IMPL_LOCK(mutex) EnterCriticalSection (&(mutex))
-# define CAIRO_MUTEX_IMPL_UNLOCK(mutex) LeaveCriticalSection (&(mutex))
-# define CAIRO_MUTEX_IMPL_INIT(mutex) InitializeCriticalSection (&(mutex))
-# define CAIRO_MUTEX_IMPL_FINI(mutex) DeleteCriticalSection (&(mutex))
-# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER { NULL, 0, 0, NULL, NULL, 0 }
+# define CAIRO_MUTEX_IMPL_LOCK(mutex) AcquireSRWLockExclusive (&(mutex))
+# define CAIRO_MUTEX_IMPL_UNLOCK(mutex) ReleaseSRWLockExclusive (&(mutex))
+# define CAIRO_MUTEX_IMPL_INIT(mutex) InitializeSRWLock (&(mutex))
+# define CAIRO_MUTEX_IMPL_FINI(mutex) CAIRO_MUTEX_IMPL_NOOP
+# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER SRWLOCK_INIT
#elif defined __OS2__ /******************************************************/