- 13 Tem, 2017 40 kayıt (commit)
-
-
Jan-Marek Glogowski yazdı
All relevant information is also provided by UpdateMinPeriod and the calculations were even duplicated. This also includes dropping Scheduler::UpdateMinPeriod, as this is now reduced to a simple comparison and assignment, as we simply ignore larger returned sleep times. Change-Id: I13852e3e63daead451bf7fcb98be9b1d44bd7abd
-
Jan-Marek Glogowski yazdı
Task::mbActive already stores the inverse information of ImplSchedulerData::mbDelete, so we can drop the latter one. Change-Id: I57f8c23ca1eebdeed780a644c83fcbeb9b92cd66
-
Jan-Marek Glogowski yazdı
Change-Id: I5283f18aebcd6797ad35771ae8fc4a0f425ff924
-
Jan-Marek Glogowski yazdı
For some (unknown) reason [NSApp postEvent: ... atStart: NO] doesn't append the event, if the message queue is empty (AKA [NSApp nextEventMatchingMask .. ] returns nil). Due to nextEventMatchingMask usage, these postEvents have to run in the main thread. Using performSelectorOnMainThread deadlocks, since the calling thread may have locked the Yield mutex, so we simply defer the call using an NSEvent, like the Windows backend. So we have to peek at the queue and if it's empty simply prepend the event using [.. atStart: YES]. In the end this make the vcl_timer unit test pass on OSX. Change-Id: Ib41186425b2f76faa0e9f116f47fdcd60d878099
-
Jan-Marek Glogowski yazdı
As all other backends, this runs the LO main loop just via the OSX main loop. Change-Id: Ie7562444951e16ff58edcaf6409f32809314c2fa
-
Jan-Marek Glogowski yazdı
Don't re-schedule a timeout, simply wait in the timer callback. Change-Id: Ib46eb6dbf57f29c85ffdbd6492922020f7785d30
-
Jan-Marek Glogowski yazdı
This removes a level of indirection for the timer callback handling. It also ensures we just have a single timeout message queued. Also drops the 16bit MAX duration limit, as CreateTimerQueueTimer uses a DWORD for the DueTime parameter, which is always UINT32. CreateTimerQueueTimer already sets the period to 0, which makes it a one-shot timer, but there is also the WT_EXECUTEONLYONCE, which enforces the Period parameter to be 0. Change-Id: I549142394334bdc098f053b42f222b23cf4fcecd
-
Jan-Marek Glogowski yazdı
Moves the common code into ProcessOrDeferMessage. All callers (try to) aquire the mutex before getting the WinSalFrame pointer, except for ImplHandleDeferredPaintMsg. This was probably an oversight, so this reverses the order in this function, so the GetWindowPtr is now always protected by the Solar mutex. Change-Id: Icb8f34f7e8716f0faa90a95903b1681f7489aed2
-
Jan-Marek Glogowski yazdı
Makes PAINT handling function use the POSTPAINT handling function and unifies the locking behaviour, so we now check the frame before trying to aquire the lock in both functions. Change-Id: Ia6bac6e24d95e680830c5405f0ab34cbed6e9688
-
Jan-Marek Glogowski yazdı
Instead of implementing an own GSource, this implements the glib based system timer using the g_timeout_source_new() function. It removes the vector of GtkSalTimer and changes the remaining timer to be single-shot, just like the Windows and KDE platforms. The ownership handling is a little bit strange and should generally be changed to use std::shared_ptr as the result of CreateSalTimer for all backends. Change-Id: Iea40a6284bdc5c121235af5a6079a92a679391ca
-
Jan-Marek Glogowski yazdı
Post the system timer as a custom event to the event queue and also changes the PostUserEvent froom a timer to a posted custom event. Change-Id: I0b77e0c64fce04b20e82ba8bbf72b7a99b1339af
-
Jan-Marek Glogowski yazdı
Change-Id: I21a0a62bd0cd122e0da676579d2b2a93264acdd8
-
Jan-Marek Glogowski yazdı
At least on Windows our GetSystemTicks() implementation - using QueryPerformanceCounter - occasionally states, the timer returned too early, which stops processing further LO events. As a workaround we restart the timer, as it's now the only source of running the LO main loop. Probably we should use osl_getSystemTime, for measuring, which uses GetSystemTimePreciseAsFileTime, if available. Nothing states anything is monotonic, so in this regard it may be flawed too. Change-Id: I94eacd8f5bacf277a68575cc8db84653cbc49d12
-
Jan-Marek Glogowski yazdı
There is really no reason to wait a millisecond for an idle. Change-Id: I7665d5f2e7d6ba3e01290a692bbc8e42c36b9986
-
Jan-Marek Glogowski yazdı
Don't add 500 usec for 0ms sleeps and always round up the sleep time so we won't sleep too short. Change-Id: I28dda435de44031c050b6edbfae1e9d392465d24
-
Jan-Marek Glogowski yazdı
Add some round-robin to the task processing, so equal priority (auto) tasks won't always be scheduled, if there are multiple tasks with the same priority. Change-Id: Ice111aa5f85e9181b3ee9799ca4df0d58f210fe9
-
Jan-Marek Glogowski yazdı
Don't account the to-be invoked task before invoking it. If it happens to be restarted, account it and eventually lower the system timer timeout. Change-Id: I567e3b92c6c2999ce51aecb31f858e51cab6c999
-
Jan-Marek Glogowski yazdı
While the stack removes all invoked tasks from the queue, which actively removes it from scheduling, it also helps to faster handle nested calls, as we don't have to look for the previous position to move the task to the end of the queue for the round robin. Change-Id: I358cf2492e9630f67685a2b780509edb56691830
-
Jan-Marek Glogowski yazdı
When (re-)starting the system timer for new task, we have to take the already passed time into account to correctly set the new timeout time for the system timer. Change-Id: I1c1c61b3e54bd14d9451c53150251534b2a960f0
-
Jan-Marek Glogowski yazdı
Idles are just instant timers, which should most time have a low priority, By dropping most special idle handling we'll just schedule by priority. This also reverts SalYieldResult back to a bool, which just indicates if any event was processed. Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
-
Jan-Marek Glogowski yazdı
The scheduler modifies the SchedulerData list mainly in two ways: 1. Remove a finished item 2. Append a new item This optimizes the Append operation by keeping a last element pointer, so we don't have to walk the whole list to find it. This way this list is converted to a queue-like structure. Change-Id: If7214e1f6016414551abbef11f26f332737f7893
-
Jan-Marek Glogowski yazdı
This refactors some more scheduler code by merging the code from ProcessTaskScheduling into CalculateMinimumTimeout and keeping the ProcessTaskScheduling name. It replace the bHasPendingIdles information with a HasPendingTasks function, based on the sleep timeout and invoke time. To drop IsIdle() we simply account Idles again and stop the system timer, so we instantly run our application loop again. This makes all Tasks really run immediate instead of waiting 1ms. Change-Id: I690a8754e6b115a53e74ef777e988b66b4e5037f
-
Jan-Marek Glogowski yazdı
Merges ImplSchedulerData::Invoke() into ProcessTaskScheduling() and removes indention levels in CalculateMinimumTimeout by using goto. This is straight forward. Change-Id: I740b97315df92f8b979089e7e22058e628f95bc0
-
Jan-Marek Glogowski yazdı
Change-Id: I54534787b8cfa4c47dc09dde9c38a7893df9d367
-
Jan-Marek Glogowski yazdı
Move all Scheduler members of ImplSVData into ImplSchedulerContext and make ImplSchedulerContext a member of ImplSVData. Change-Id: I186bebdfb5701543595848968235b5a56b6598e9
-
Jan-Marek Glogowski yazdı
1. calling Start() for invoked tasks 2. correctly schedule by priority 3. self-stopping AutoTimer This also adds SAL_INFO output to Scheduler and Task to log the scheduling processing tasks. Change-Id: I3c8a708d1fd51c550320f8af3f9486c43c32e358
-
Noel Grandin yazdı
Change-Id: Ib7b4f2b2403ce766a7db2f6ffc118468e7677776 Reviewed-on: https://gerrit.libreoffice.org/39889Tested-by:
Jenkins <ci@libreoffice.org> Reviewed-by:
Noel Grandin <noel.grandin@collabora.co.uk>
-
Noel Grandin yazdı
Change-Id: I81e9d0cd4f430b11d20037054055683240792240 Reviewed-on: https://gerrit.libreoffice.org/39825Tested-by:
Jenkins <ci@libreoffice.org> Reviewed-by:
Noel Grandin <noel.grandin@collabora.co.uk>
-
Stephan Bergmann yazdı
Change-Id: Ie3ecf1dc0ad038113dbeab5332874bbd3279abab
-
Stephan Bergmann yazdı
Change-Id: I4edf130e526c4004aa8913e6aafdcd1e2f4ac1ef
-
Stephan Bergmann yazdı
Change-Id: If564ba545fbd1504127ff5116fb776ef60d6ab60
-
Stephan Bergmann yazdı
Change-Id: Icfc67638e2aee9b5025dd40a50a2627d153ada4d
-
Stephan Bergmann yazdı
Change-Id: Id00cf5f78ef59520065587691c85f2e1a7e96a9c
-
Stephan Bergmann yazdı
Change-Id: I242ef3d2d91dee97e47aab209160e6e7fa566a6d
-
Stephan Bergmann yazdı
Change-Id: I8c88b295d797a98f0374e3ce57b9c875b72c7bd3
-
Stephan Bergmann yazdı
Change-Id: I3b60b918277b408038a99f2c4801a454e6aa7b4a
-
Stephan Bergmann yazdı
Change-Id: I83fe6f3a918cef2da0085858b63ef86005a61619
-
Stephan Bergmann yazdı
Change-Id: Ic39410a26691e039229f052e79c49d03b578c647
-
Stephan Bergmann yazdı
Change-Id: I2cf41554d0f347ce5f052fce587e394ca6f92531
-
Stephan Bergmann yazdı
Change-Id: I76c0ac6cbd8475884fb80002ebb91f2ba84818a0
-