diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-06-10 12:08:00 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-06-10 17:27:20 +0100 |
commit | 48c2815dd20cf20eeec8bb4e003000f4a3d13291 (patch) | |
tree | 19596543beea4e4f56d1d06f429e575f596f0ad7 /include/vcl/scheduler.hxx | |
parent | add ./logerrit testfeature (diff) | |
download | core-48c2815dd20cf20eeec8bb4e003000f4a3d13291.tar.gz core-48c2815dd20cf20eeec8bb4e003000f4a3d13291.zip |
tdf#91727 - Unwind non-dispatch of idle handlers.
This clobbers the functionality from commit:
06d731428ef6cf93c7333e8228bfb6088853b52f
make idle timers actually activate only when idle
Since now all rendering and re-sizing is done in idle handlers it
does effectively the opposite of what was intended. A better solution
would allow special-casing the processing of just rendering,
re-sizing and window management to spin for eg. progress bar
rendering.
Also add helpful debugging labels to the idle & timeouts.
Also cleanup the Idle vs. Scheduler handling.
Also ensure that starting an Idle triggers a mainloop wakeup.
Also add a unit test.
Change-Id: Ifb0756714378fdb790be599b93c7a3ac1f9209e6
Diffstat (limited to 'include/vcl/scheduler.hxx')
-rw-r--r-- | include/vcl/scheduler.hxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx index dfa1483132b2..6c4e2116b589 100644 --- a/include/vcl/scheduler.hxx +++ b/include/vcl/scheduler.hxx @@ -52,23 +52,27 @@ enum class SchedulerPriority { class VCL_DLLPUBLIC Scheduler { protected: - ImplSchedulerData* mpSchedulerData; // Pointer to element in scheduler list - SchedulerPriority mePriority; // Scheduler priority - bool mbActive; // Currently in the scheduler + ImplSchedulerData* mpSchedulerData; /// Pointer to element in scheduler list + const sal_Char *mpDebugName; /// Useful for debugging + SchedulerPriority mePriority; /// Scheduler priority + bool mbActive; /// Currently in the scheduler friend struct ImplSchedulerData; virtual void SetDeletionFlags(); - virtual bool ReadyForSchedule( bool bTimer ) { return !bTimer; } - virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ); + virtual bool ReadyForSchedule( bool bTimer ) = 0; + virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) = 0; public: - Scheduler(); + Scheduler( const sal_Char *pDebugName = NULL ); Scheduler( const Scheduler& rScheduler ); virtual ~Scheduler(); void SetPriority( SchedulerPriority ePriority ); SchedulerPriority GetPriority() const { return mePriority; } + void SetDebugName( const sal_Char *pDebugName ) { mpDebugName = pDebugName; } + const sal_Char *GetDebugName() { return mpDebugName; } + // Call handler virtual void Invoke() = 0; |