Menu

#207 The effect causes KWin to paint the area behind opaque windows, resulting in higher GPU usage

open
nobody
2024-04-17
2024-04-17
Anonymous
No

Originally created by: taj-ny

With just a few blurred windows in the background, the regions that have to be painted quickly add up, even if all the windows are covered by an opaque window.

I believe this is an accident, as data.setTranslucent() sets data.opaque to an empty region, but just a few lines later you are subtracting from that empty region.
https://github.com/matinlotfali/KDE-Rounded-Corners/blob/master/src/ShapeCornersEffect.cpp#L137-L149
https://github.com/KDE/kwin/blob/v6.0.3/src/effect/effect.cpp#L20-L25

I commented out the data.setTranslucent() line and the GPU usage has dropped in the situation described at the beginning. I haven't noticed any issues with corners, shadows or the outline on Wayland and X11.

Although I should mention that Plasma 6 broke transparent color schemes and the translucent area behind some windows is no longer painted (bug report, video), resulting in artifacts on Wayland. data.setTranslucent() does fix this, so removing it could bring back the issue for some users.

I'm running Plasma 6.0.3 with KDE-Rounded-Corners 0.6.1.

Discussion

  • Anonymous

    Anonymous - 2024-04-17

    Originally posted by: matinlotfali

    You are absolutely correct. The setTranslucent is there only because of the ugly artifacts. I should have written comments in the code about it.

     
  • Anonymous

    Anonymous - 2024-04-17

    Originally posted by: matinlotfali

    Sadly, I don't know how else I can prevent the artifact. I am open for suggestions.

     

Log in to post a comment.

MongoDB Logo MongoDB