Fix rendering issues of subsurfaces by using proper clipping
ClosedPublic

Authored by graesslin on Oct 19 2017, 7:11 PM.

Details

Summary

Rendering subsurfaces in the OpenGL compositor has always resulted in
flickering when a subsurface gets repainted and there is a window on top
of it. Looking at the code this is rather obvious: the clipping of the
main window is ignored and the complete subsurface is rendered as is and
thus also rendering above windows where it should not render.

This change passes the clip region and whether hardware clipping is used
to the rendering of subsurfaces which in turn uses it for rendering the
texture.

BUG: 385924
FIXED-IN: 5.11.2

Test Plan

Opened systemsettings, went to decoration KCM, put a window
partially above and scrolled. Without change: strong flicker, with change:
no flicker.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Oct 19 2017, 7:11 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 19 2017, 7:11 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Oct 23 2017, 2:36 PM
davidedmundson added a subscriber: davidedmundson.

Seems to fix the issue mentioned. Works fine with scaling.

It doesn't fix all issues; some system settings modules still paint outside their bounds; but we can address that later.

This revision is now accepted and ready to land.Oct 23 2017, 2:36 PM

Seems to fix the issue mentioned. Works fine with scaling.

It doesn't fix all issues; some system settings modules still paint outside their bounds; but we can address that later.

That is a bug in Qt. I reported it years ago. Don't know the id right now, but should be easy to find if you look for bugs reported by me.

This revision was automatically updated to reflect the committed changes.