Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5bd1106c
Kaydet (Commit)
5bd1106c
authored
Ock 19, 2015
tarafından
Tobias Madl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added Comments
Change-Id: I093b4812bf3b75d6a6f3c8ea38755619f5c9d151
üst
3f64e7c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
idle.hxx
include/vcl/idle.hxx
+6
-7
idle.cxx
vcl/source/app/idle.cxx
+8
-3
No files found.
include/vcl/idle.hxx
Dosyayı görüntüle @
5bd1106c
...
...
@@ -27,6 +27,7 @@
struct
ImplIdleData
;
struct
ImplSVData
;
// The timemarks behind the priorities is the catgorizing of timer to idle
enum
class
IdlePriority
{
VCL_IDLE_PRIORITY_STARVATIONPROTECTION
=
-
1
,
// Do not use this for normal prioritizing
VCL_IDLE_PRIORITY_HIGHEST
=
0
,
// -> 0ms
...
...
@@ -41,16 +42,14 @@ enum class IdlePriority {
};
// To port from Timer -> Idle switch class name,
// s/Timeout/DoIdle/ etc. and select priority
class
VCL_DLLPUBLIC
Idle
{
protected
:
ImplIdleData
*
mpIdleData
;
IdlePriority
mePriority
;
IdlePriority
meDefaultPriority
;
bool
mbActive
;
Link
maIdleHdl
;
ImplIdleData
*
mpIdleData
;
// Pointer to element in idle list
IdlePriority
mePriority
;
// Idle priority ( maybe divergent to default)
IdlePriority
meDefaultPriority
;
// Default idle priority
bool
mbActive
;
// Currently in the scheduler
Link
maIdleHdl
;
// Callback Link
friend
struct
ImplIdleData
;
...
...
vcl/source/app/idle.cxx
Dosyayı görüntüle @
5bd1106c
...
...
@@ -59,7 +59,7 @@ struct ImplIdleData
pMostUrgent
=
p
;
else
{
// Find the highest priority
one somehow
.
// Find the highest priority.
if
(
p
->
mpIdle
->
GetPriority
()
<
pMostUrgent
->
mpIdle
->
GetPriority
()
)
{
IncreasePriority
(
pMostUrgent
->
mpIdle
);
...
...
@@ -77,8 +77,10 @@ struct ImplIdleData
{
switch
(
pIdle
->
GetPriority
())
{
// Increase priority based on their current priority
case
IdlePriority
:
:
VCL_IDLE_PRIORITY_STARVATIONPROTECTION
:
break
;
// If already highest priority -> extra state for starving tasks
case
IdlePriority
:
:
VCL_IDLE_PRIORITY_HIGHEST
:
pIdle
->
SetPriority
(
IdlePriority
::
VCL_IDLE_PRIORITY_STARVATIONPROTECTION
);
break
;
...
...
@@ -142,7 +144,7 @@ void Idle::ProcessAllIdleHandlers()
pIdleData
=
pSVData
->
mpFirstIdleData
;
while
(
pIdleData
)
{
// Was
timer
destroyed in the meantime?
// Was
Idle
destroyed in the meantime?
if
(
pIdleData
->
mbDelete
)
{
if
(
pPrevIdleData
)
...
...
@@ -166,6 +168,8 @@ void Idle::ProcessAllIdleHandlers()
void
Idle
::
SetPriority
(
IdlePriority
ePriority
)
{
mePriority
=
ePriority
;
// Was a new priority set before excecution?
// Then take it as default priority
if
(
!
mbActive
&&
meDefaultPriority
==
IdlePriority
::
VCL_IDLE_PRIORITY_DEFAULT
)
meDefaultPriority
=
mePriority
;
}
...
...
@@ -177,12 +181,13 @@ void Idle::DoIdle()
void
Idle
::
Start
()
{
// Mark timer active
mbActive
=
true
;
ImplSVData
*
pSVData
=
ImplGetSVData
();
if
(
!
mpIdleData
)
{
// insert
timer and start
// insert
Idle
mpIdleData
=
new
ImplIdleData
;
mpIdleData
->
mpIdle
=
this
;
mpIdleData
->
mbInIdle
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment