D22295: Remove scene check on repaints

Vlad Zagorodniy noreply at phabricator.kde.org
Mon Jul 15 14:32:21 BST 2019


zzag added inline comments.

INLINE COMMENTS

> composite.cpp:795
>  {
> -    if (m_state != State::On) {
> +    if (m_state != State::On || compositeTimer.isActive()) {
>          return;

It's a matter of personal taste, but maybe if statements should check only related stuff(i.e. don't inflate conditionals). Whether compositing is active and whether the composite timer is active seem to be unrelated.

Also, this will be a great idea to document when the composite timer condition can be fulfilled.

  if (m_state != State::On) {
      return;
  }
  
  // This if statements checks something completely different, thus it's not
  // merged with the previous if statement.
  if (compositeTimer.isActive()) {
      return;
  }

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D22295

To: romangg, #kwin
Cc: zzag, kwin, LeGast00n, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190715/d954b1cf/attachment.html>


More information about the kwin mailing list