vcl/win/app/salinst.cxx | 2 +- vcl/win/gdi/salbmp.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit cd1d5f35cb0f9c455787819de56e24cd51e6c5cc Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Mon Jul 17 14:10:16 2017 +0200 WIN revert to Sleep(1) for yield There are multiple ways on Windows to yield a thread: * SwitchToThread: yields to any thread on same processor * Sleep(0): yields to any thread of same or higher priority on any processor * Sleep(1): yields to any thread on any processor So we stay with Sleep(1), as it also seems the only call, which actually does some sleep and is not a busy wait. Change-Id: I85c69b2f32dba9869bbddc1a572b3a63c366c5d1 diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 3a1522f7e836..3b29cf820b01 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -618,7 +618,7 @@ bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong // #i18883# only sleep if potential deadlock scenario, ie, when a dialog is open if( ImplGetSVData()->maAppData.mnModalMode ) - SwitchToThread(); + Sleep(1); else bDidWork = SendMessageW( mhComWnd, SAL_MSG_THREADYIELD, (WPARAM)bWait, (LPARAM)bHandleAllCurrentEvents ); commit f0dae5fb2b0628659a121ca3f9ee9bf9039a49dd Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Mon Jul 17 13:58:44 2017 +0200 WIN annotate GdiPlusBuffer Timer Change-Id: Ia7aa081848647314e14b5ccd3063d51700f2b6c6 diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index 8b95249da6d8..98b59e771c74 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -71,8 +71,8 @@ private: EntryMap maEntries; public: - GdiPlusBuffer() - : Timer(), + GdiPlusBuffer( const sal_Char *pDebugName ) + : Timer( pDebugName ), maEntries() { SetTimeout(1000); @@ -172,7 +172,7 @@ public: // Global instance of GdiPlusBuffer which manages Gdiplus::Bitmap // instances -static GdiPlusBuffer aGdiPlusBuffer; +static GdiPlusBuffer aGdiPlusBuffer( "vcl::win GdiPlusBuffer aGdiPlusBuffer" ); WinSalBitmap::WinSalBitmap() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits