diff --git a/composite.cpp b/composite.cpp index 9edb99daee..8c87984874 100644 --- a/composite.cpp +++ b/composite.cpp @@ -175,7 +175,6 @@ void Workspace::setupCompositing() vBlankPadding = 3; // vblank rounding errors... :-( nextPaintReference = QDateTime::currentMSecsSinceEpoch(); checkCompositeTimer(); - composite_paint_times.clear(); XCompositeRedirectSubwindows(display(), rootWindow(), CompositeRedirectManual); new EffectsHandlerImpl(scene->compositingType()); // sets also the 'effects' pointer addRepaintFull(); @@ -438,7 +437,6 @@ void Workspace::performCompositing() // checkCompositeTime() would restart it again somewhen later, called from functions that // would again add something pending. checkCompositeTimer(); - checkCompositePaintTime(t.elapsed()); #endif } @@ -512,63 +510,6 @@ bool Workspace::createOverlay() #endif } -void Workspace::checkCompositePaintTime(int msec) -{ - if (options->disableCompositingChecks) - return; - // Sanity check. QTime uses the system clock so if the user changes the time or - // timezone our timer will return undefined results. Ideally we would use a system - // clock independent timer but I am uncertain if Qt provides a nice wrapper for - // one or not. As it's unlikely for a single paint to take 15 seconds it seems - // like a good upper bound. - if (msec < 0 || msec > 15000) - return; - composite_paint_times.prepend(msec); - bool tooslow = false; - // If last 3 paints were way too slow, disable and warn. - // 1 second seems reasonable, it's not that difficult to get relatively high times - // with high system load. - const int MAX_LONG_PAINT = 1000; - if (composite_paint_times.count() >= 3 && composite_paint_times[ 0 ] > MAX_LONG_PAINT - && composite_paint_times[ 1 ] > MAX_LONG_PAINT && composite_paint_times[ 2 ] > MAX_LONG_PAINT) { - kDebug(1212) << "Too long paint times, suspending"; - tooslow = true; - } - // If last 15 seconds all paints (all of them) were quite slow, disable and warn too. Quite slow being 0,1s - // should be reasonable, that's 10fps and having constant 10fps is bad. - // This may possibly trigger also when activating an expensive effect, so this may need tweaking. - const int MAX_SHORT_PAINT = 100; - const int SHORT_TIME = 15000; // 15 sec - int time = 0; - foreach (int t, composite_paint_times) { - if (t < MAX_SHORT_PAINT) - break; - time += t; - if (time > SHORT_TIME) { // all paints in the given time were long - kDebug(1212) << "Long paint times for long time, suspending"; - tooslow = true; - break; - } - } - if (composite_paint_times.count() > 1000) - composite_paint_times.removeLast(); - if (tooslow) { - QTimer::singleShot(0, this, SLOT(suspendCompositing())); - QString shortcut, message; - if (KAction* action = qobject_cast(keys->action("Suspend Compositing"))) - shortcut = action->globalShortcut().primary().toString(QKeySequence::NativeText); - if (shortcut.isEmpty()) - message = i18n("Desktop effects were too slow and have been suspended.\n" - "You can disable functionality checks in System Settings (on the Advanced tab in Desktop Effects)."); - else - message = i18n("Desktop effects were too slow and have been suspended.\n" - "If this was only a temporary problem, you can resume using the '%1' shortcut.\n" - "You can disable functionality checks in System Settings (on the Advanced tab in Desktop Effects).", shortcut); - Notify::raise(Notify::CompositingSlow, message); - compositeTimer.start(1000, this); // so that it doesn't trigger sooner than suspendCompositing() - } -} - void Workspace::setupOverlay(Window w) { assert(overlay != None); diff --git a/kwin.notifyrc b/kwin.notifyrc index f6d720c243..26d0140ced 100644 --- a/kwin.notifyrc +++ b/kwin.notifyrc @@ -6756,136 +6756,6 @@ Comment[x-test]=xxA window on an inactive virtual desktop demands attentionxx Comment[zh_CN]=未激活的虚拟桌面上的窗口请求注意 Comment[zh_TW]=在其他虛擬桌面上的視窗要求注意 -[Event/compositingslow] -Name=Compositing Performance Is Slow -Name[ar]=أداء التركيب بطيء -Name[ast]=El rendimientu de composición ye lento -Name[be@latin]=Kampazycyja zamarudnaja -Name[bs]=Presporo slaganje -Name[ca]=El rendiment de la composició és lent -Name[ca@valencia]=El rendiment de la composició és lent -Name[cs]=Výkon kompozice je pomalý -Name[da]=Compositing-ydelsen er langsom -Name[de]=Die Composit-Geschwindigkeit ist niedrig -Name[el]=Οι επιδόσεις σύνθεσης της εικόνας είναι χαμηλές -Name[en_GB]=Compositing Performance Is Slow -Name[es]=El rendimiento de composición es lento -Name[et]=Komposiidi jõudlus on nõrk -Name[eu]=Konposaketaren performantzia motela da -Name[fi]=Koostamissuorityskyky on huono -Name[fr]=La performance de composition est basse -Name[fy]=De prestaasje fan compositing binne traach -Name[ga]=Tá Comhshuí Mall -Name[gl]=O rendemento da composición é pobre -Name[gu]=કોમ્પોઝિટીંગ કાર્યક્ષમતા ધીમી છે -Name[he]=ביצועי השזירה איטיים -Name[hi]=कम्पोजिटिंग परफ़ॉर्मेंस धीमा है -Name[hne]=कम्पोजिटिंग परफारमेंस धीमा हे -Name[hr]=Usporen rad miješanja -Name[hu]=A kompozit módú megjelenítés túl lassú -Name[ia]=Le rendimento de composition es lente -Name[id]=Performa Komposit Pelan -Name[is]=Afköst skjásamsetningar eru lág -Name[it]=Composizione lenta -Name[ja]=コンポジティングのパフォーマンスの問題 -Name[kk]=Құрастыру жылдамдығы баяу -Name[km]=តែង​ការ​អនុវត្ត​គឺ​យឺត -Name[kn]=ಕಾಂಪೋಸ್ಟಿಂಗ್ ಕಾರ್ಯಕ್ಷಮತೆ ನಿಧಾನವಾಗಿದೆ -Name[ko]=컴포지팅 성능이 안 좋습니다 -Name[lt]=Komponavimas dirba lėtai -Name[lv]=Darbvirsmas kompozīcijas veiktspēja ir lēna -Name[ml]=കോമ്പോസിറ്റിങ്ങ് പെര്‍ഫോര്‍മന്‍സ് പതുക്കെയാണു് -Name[nb]=Sammensettingsytelsen er langsom -Name[nds]=Tosamensett-Leisten is siet -Name[nl]=De prestaties van compositing zijn langzaam -Name[nn]=Samansetjinga er treg -Name[pa]=ਕੰਪੋਜ਼ਿਸ਼ਨ ਕਾਰਗੁਜ਼ਾਰੀ ਹੌਲੀ ਹੈ -Name[pl]=Wydajność kompozycji jest słaba -Name[pt]=A Performance da Composição está Lenta -Name[pt_BR]=A performance da composição está lenta -Name[ro]=Performanța compoziționării este slabă -Name[ru]=Низкая производительность при включённых графических эффектах -Name[si]=රචනා කාර්‍යයක්‍ෂමතා වේගය ඉතා අඩුවිය -Name[sk]=Výkon kompozície je pomalý -Name[sl]=Namizni učinki so počasni -Name[sr]=Преспоро слагање -Name[sr@ijekavian]=Преспоро слагање -Name[sr@ijekavianlatin]=Presporo slaganje -Name[sr@latin]=Presporo slaganje -Name[sv]=Prestanda vid sammansättning är dålig -Name[ta]=Compositing Performance Is Slow -Name[te]=కాంపోజిటింగ్ పనితనము నెమ్మదిగావుంది -Name[th]=การทำคอมโพสิตมีระสิทธิภาพต่ำ -Name[tr]=Birleşiklik Başarımı Yavaş -Name[uk]=Швидкодія композитного показу мала -Name[x-test]=xxCompositing Performance Is Slowxx -Name[zh_CN]=混成性能过低 -Name[zh_TW]=組合效能過慢 -Comment=The compositing performance was too slow and compositing has been suspended -Comment[ar]=أداء التركيب بطيء جدا و تم تعليقه. -Comment[ast]=El rendimientu de composición yera tan lentu que se finó -Comment[be@latin]=Chutkaść kampazycyi była zamałoj, i tamu jana była vyklučanaja. -Comment[bs]=Performanse slaganja su premale, i stoga je ono suspendovano -Comment[ca]=El rendiment de la composició era massa lent i s'ha suspès -Comment[ca@valencia]=El rendiment de la composició era massa lent i s'ha suspès -Comment[cs]=Výkon kompozice byl příliš nízký, proto byla vypnuta -Comment[da]=Compositing-ydelsen var for langsom, og compositing er blevet suspenderet -Comment[de]=Die Composit-Geschwindigkeit ist zu niedrig gewesen, daher ist das Compositing ausgesetzt worden. -Comment[el]=Οι επιδόσεις σύνθεσης της εικόνας ήταν πολύ χαμηλές και η σύνθεση εικόνας αναστάλθηκε -Comment[en_GB]=The compositing performance was too slow and compositing has been suspended -Comment[es]=El rendimiento de composición era tan lento que se ha suspendido -Comment[et]=Komposiidi jõudlus oli kesine ja komposiit peatati -Comment[eu]=Konposaketaren performantzia motelegia zen eta konposaketa eseki egin da -Comment[fi]=Koostamissuorituskyky oli huono ja koostaminen keskeytettiin -Comment[fr]=La performance de composition était trop basse et celle-ci a due être suspendue -Comment[fy]=De prestaasje fan compositing wie te traach en is ûnderbrútsen -Comment[ga]=Bhí comhshuí rómhall agus cuireadh é ar fionraí -Comment[gl]=O rendemento da composición era baixo de máis polo que se detivo -Comment[gu]=કોમ્પોઝિંટિંગ કાર્યક્ષમતા બહુ ધીમી છે અને કોમ્પોઝિંટિંગ સસ્પેન્ડ કરવામાં આવ્યું છે -Comment[he]=ביצועי השזירה היו נמוכים, ולכן השזירה הושהתה -Comment[hne]=कम्पोजिटिंग परफारमेंस बहुत धीमा हेअउ कम्पोजिटिंग सस्पेंड कर दे गे हे -Comment[hr]=Brzina miješanja je bila prespora pa je miješanje pauzirano -Comment[hu]=A kompozit módú megjelenítés túl lassú, ezért ki lesz kapcsolva -Comment[ia]=Le rendimento de composition esseva troppo lente e le composition ha essite suspendite -Comment[id]=Performa komposit terlalu pelan dan komposit telah disuspensi -Comment[is]=Afköst skjásamsetningar voru of lítil og hefur verið hætt að styðjast við slíkt -Comment[it]=Le prestazioni di composizione erano troppo scarse, e quindi la composizione è stata sospesa -Comment[ja]=コンポジティングのパフォーマンスが遅すぎるため、コンポジティングを一時停止しました -Comment[kk]=Құрастыру жылдамдығы баяу болғандықтан құрастыру тежеп қалды -Comment[km]=ការ​តែង​ការ​អនុវត្ត​យឺត​ណាស់ និង​ការ​តែង​ត្រូវបាន​ផ្អាក -Comment[kn]=ಕಾಂಪೋಸ್ಟಿಂಗ್ ಕಾರ್ಯಕ್ಷಮತೆ ಬಹಳ ನಿಧಾನವಾಗಿದ್ದು, ಕಾಂಪೋಸ್ಟಿಂಗ್ ಅನ್ನು ರದ್ದುಗೊಳಿಸಲಾಗಿದೆ -Comment[ko]=컴포지팅 성능이 너무 안 좋아서 컴포지팅을 중단합니다 -Comment[lt]=Komponavimas dirbo per lėtai ir buvo sustabdytas -Comment[lv]=Darbvirsmas kompozīcijas veiktspēja bija pārāk lēna un kompozīcija tika apturēta -Comment[ml]=കോമ്പോസിറ്റിങ്ങ് പെര്‍ഫോര്‍മന്‍സ് വളരെ പതുക്കെ ആയിരുന്നതിനാല്‍ കോമ്പോസിറ്റിങ്ങ് നിര്‍ത്തിവെച്ചിരിക്കുന്നു -Comment[nb]=Sammensettingsytelsen var for langsom og sammensetting er blitt suspendert -Comment[nds]=Dat Tosamensetten weer to langsam un wöör utmaakt -Comment[nl]=De prestaties van compositing waren te traag. Om die reden is compositing onderbroken -Comment[nn]=Samansetjinga var treg, så ho vart difor stoppa -Comment[pa]=ਕੰਪੋਜ਼ਿਸ਼ਨ ਕਾਰਗੁਜ਼ਾਰੀ ਬਹੁਤ ਹੌਲੀ ਸੀ ਤੇ ਕੰਪੋਜ਼ਿਸ਼ਨ ਨੂੰ ਸਸਪੈਂਡ ਕੀਤਾ ਗਿਆ ਹੈ। -Comment[pl]=Wydajność kompozycji jest za słaba; kompozycja została wyłączona -Comment[pt]=A performance da composição estava demasiado lenta, pelo que esta foi suspensa -Comment[pt_BR]=A performance da composição estava muito lenta e foi suspensa -Comment[ro]=Performanța compoziționării a fost prea lentă și compoziționarea a fost suspendată -Comment[ru]=Отключение графических эффектов, чтобы обеспечить производительность -Comment[si]=රචනා කාර්‍යයක්‍ෂමතා වේගය ඉතා අඩු වූ බැවින් එය අත්හිටුවිනි -Comment[sk]=Výkon kompozície bol príliš pomalý, preto bola kompozícia pozastavená -Comment[sl]=Hitrost prikaza namiznih učinkov je bila prenizka, zato so bili učinki izklopljeni -Comment[sr]=Перформансе слагања су премале, и стога је оно суспендовано -Comment[sr@ijekavian]=Перформансе слагања су премале, и стога је оно суспендовано -Comment[sr@ijekavianlatin]=Performanse slaganja su premale, i stoga je ono suspendovano -Comment[sr@latin]=Performanse slaganja su premale, i stoga je ono suspendovano -Comment[sv]=Prestanda vid sammansättning var för dålig och sammansättning har inaktiverats -Comment[ta]=The compositing performance was too slow and compositing has been suspended -Comment[te]=కాంపోజిటింగ్ పనితనము మరీ నెమ్మదిగా వుంది మరియు కాంపోజిటింగ్ సస్పెండ్ చేయబడింది -Comment[th]=การทำคอมโพสิตถูกหยุดชั่วคราวเนื่องจากการทำงานของมันมีประสิทธิภาพต่ำมาก -Comment[tr]=Birleşiklik (compositing) başarımı çok düşük, birleşiklik askıya alındı -Comment[uk]=Швидкодія композитного показу була замалою, тому композитний показ було призупинено -Comment[x-test]=xxThe compositing performance was too slow and compositing has been suspendedxx -Comment[zh_CN]=由于混成性能过低,此特性已经被暂时关闭 -Comment[zh_TW]=組合效能過慢,因此被暫停了 -Action=Popup - [Event/compositingsuspendeddbus] Name=Compositing has been suspended Name[ar]=عُلِّق التركيب diff --git a/notifications.cpp b/notifications.cpp index 3095819c80..2f0ee201af 100644 --- a/notifications.cpp +++ b/notifications.cpp @@ -98,10 +98,6 @@ bool Notify::raise(Event e, const QString& message, Client* c) case DemandAttentionOther: event = "demandsattentionother"; break; - case CompositingSlow: - event = "compositingslow"; - flags = KNotification::Persistent; - break; case CompositingSuspendedDbus: event = "compositingsuspendeddbus"; break; diff --git a/notifications.h b/notifications.h index 6510e41bdc..8b92a6737b 100644 --- a/notifications.h +++ b/notifications.h @@ -57,7 +57,6 @@ public: ResizeEnd, DemandAttentionCurrent, DemandAttentionOther, - CompositingSlow, CompositingSuspendedDbus, TilingLayoutChanged, DesktopChange = 100 diff --git a/workspace.h b/workspace.h index b45e9789ee..2cd5d3152f 100644 --- a/workspace.h +++ b/workspace.h @@ -819,7 +819,6 @@ private: bool windowRepaintsPending() const; void setCompositeTimer(); - void checkCompositePaintTime(int msec); QVector desktop_focus_chain; @@ -1007,7 +1006,6 @@ private: QPushButton* transButton; QTimer unredirectTimer; bool forceUnredirectCheck; - QList< int > composite_paint_times; QTimer compositeResetTimer; // for compressing composite resets bool m_finishingCompositing; // finishCompositing() sets this variable while shutting down