From 37a507295597588f7286d928368027a9caa2c14a Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Thu, 12 Feb 2015 20:20:30 +0300 Subject: [PATCH] move some vars from TLS to __gshared --- src/dlangui/core/events.d | 2 +- src/dlangui/graphics/ftfonts.d | 4 ++-- src/dlangui/platforms/common/platform.d | 2 +- src/dlangui/platforms/windows/win32drawbuf.d | 2 +- src/dlangui/widgets/tabs.d | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dlangui/core/events.d b/src/dlangui/core/events.d index 89ba5b06..7279d37d 100644 --- a/src/dlangui/core/events.d +++ b/src/dlangui/core/events.d @@ -1130,7 +1130,7 @@ class CustomEvent { protected int _id; protected uint _uniqueId; - protected static uint _uniqueIdGenerator; + protected static __gshared uint _uniqueIdGenerator; protected Widget _destinationWidget; // event id diff --git a/src/dlangui/graphics/ftfonts.d b/src/dlangui/graphics/ftfonts.d index 3918d4b9..e28a1de9 100644 --- a/src/dlangui/graphics/ftfonts.d +++ b/src/dlangui/graphics/ftfonts.d @@ -111,7 +111,7 @@ private class FreeTypeFontFile { @property int weight() { return _weight; } @property bool italic() { return _italic; } - debug private static int _instanceCount; + debug private static __gshared int _instanceCount; this(FT_Library library, string filename) { _library = library; _filename = filename; @@ -487,7 +487,7 @@ class FreeTypeFontManager : FontManager { //private FontList _activeFonts; - private static FontRef _nullFontRef; + private static __gshared FontRef _nullFontRef; this() { // load dynaic library diff --git a/src/dlangui/platforms/common/platform.d b/src/dlangui/platforms/common/platform.d index 1d265cec..0003ffb9 100644 --- a/src/dlangui/platforms/common/platform.d +++ b/src/dlangui/platforms/common/platform.d @@ -87,7 +87,7 @@ class EventList { } class TimerInfo { - static ulong nextId; + static __gshared ulong nextId; this(Widget targetWidget, long intervalMillis) { _id = ++nextId; diff --git a/src/dlangui/platforms/windows/win32drawbuf.d b/src/dlangui/platforms/windows/win32drawbuf.d index d97eac64..7f5542e6 100644 --- a/src/dlangui/platforms/windows/win32drawbuf.d +++ b/src/dlangui/platforms/windows/win32drawbuf.d @@ -57,7 +57,7 @@ class Win32ColorDrawBuf : ColorDrawBufBase { /// returns HBITMAP for alpha HBITMAP createTransparencyBitmap() { int hbytes = (((_dx + 7) / 8) + 1) & 0xFFFFFFFE; - static ubyte[] buf; + static __gshared ubyte[] buf; buf.length = hbytes * _dy * 2; //for (int y = 0; y < _dy; y++) { // uint * src = scanLine(y); diff --git a/src/dlangui/widgets/tabs.d b/src/dlangui/widgets/tabs.d index a436a7cf..f90ef968 100644 --- a/src/dlangui/widgets/tabs.d +++ b/src/dlangui/widgets/tabs.d @@ -41,7 +41,7 @@ interface TabCloseHandler { /// tab item metadata class TabItem { - private static long _lastAccessCounter; + private static __gshared long _lastAccessCounter; private string _iconRes; private string _id; private UIString _label;