summaryrefslogtreecommitdiff
path: root/vcl/inc/win/saltimer.h
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-10-12 16:00:42 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-10-13 16:48:32 +0200
commitfb4e7be5d4eac6d7c429c215e72de45ea28d86cd (patch)
tree82b4d4282baa970cbc6990d77b5f7ac3451aa3af /vcl/inc/win/saltimer.h
parent21ccc64782f485f4fce7cd645f24dabb4b6eb985 (diff)
WIN another system loop integration attempt
This time we skip the intention to handle our Scheduler completely via the system event loop. Instead we basically guarantee to process a Scheduler event during each DoYield, if one is available. This way we won't block system events when busy in our event loop. Change-Id: I37094e61cbf928733151d9cc3299cdac76b3a5cd Reviewed-on: https://gerrit.libreoffice.org/43349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/win/saltimer.h')
-rw-r--r--vcl/inc/win/saltimer.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 5ad6a1718f19..37976bbfaf8b 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -26,15 +26,18 @@ class WinSalTimer final : public SalTimer, protected VersionedEvent
{
// for access to Impl* functions
friend LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef );
- // for access to m_bPollForMessage
+ // for access to GetNextVersionedEvent
friend void CALLBACK SalTimerProc( PVOID data, BOOLEAN );
+ // for access to ImplHandleElapsedTimer
+ friend bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents );
HANDLE m_nTimerId; ///< Windows timer id
- bool m_bPollForMessage; ///< Run yield until a message is caught (most likely the 0ms timer)
+ bool m_bDirectTimeout; ///< timeout can be processed directly
void ImplStart( sal_uIntPtr nMS );
void ImplStop();
- void ImplEmitTimerCallback();
+ void ImplHandleTimerEvent( WPARAM aWPARAM );
+ void ImplHandleElapsedTimer();
public:
WinSalTimer();
@@ -43,19 +46,12 @@ public:
virtual void Start(sal_uIntPtr nMS) override;
virtual void Stop() override;
- inline bool IsValidWPARAM( WPARAM wParam ) const;
-
- inline bool PollForMessage() const;
+ inline bool IsDirectTimeout() const;
};
-inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const
-{
- return IsValidEventVersion( static_cast<sal_Int32>( aWPARAM ) );
-}
-
-inline bool WinSalTimer::PollForMessage() const
+inline bool WinSalTimer::IsDirectTimeout() const
{
- return m_bPollForMessage;
+ return m_bDirectTimeout;
}
#endif