Render GL Window decorations at the correct scale
ClosedPublic

Authored by davidedmundson on Nov 1 2017, 5:09 PM.

Details

Summary

Under wayland we support high DPI putting by putting a separation
between the logical co-ordinate system and the resolution of rendered
assets.

When a window is on a high DPI screen, we should render at the higher
resolution.

Like the window scaling this handles any combination of a 2x scaled
decoration being rendered on a 1x screen or vice versa.


This patch is a bit different from the other scaling stuff. We have to
generate the quads *before* we have an updated texture with the new
scale. This means the scale isn't attached to the buffer like elsewhere.

That's why I added a property in TopLevel so there's still one canonical
source and things can't get out of sync.

BUG: 384765

Test Plan

Crystal clear breeze and oxygen decos on my @2x display
Drag windows to attached @1x display, things still look OK when across 2 screens
Changing the scale of a screen updated the decos instantly

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.
davidedmundson created this revision.Nov 1 2017, 5:09 PM
Restricted Application added a project: KWin. · View Herald TranscriptNov 1 2017, 5:09 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
graesslin accepted this revision.Nov 1 2017, 5:40 PM
graesslin added a subscriber: graesslin.

nice :-)

This revision is now accepted and ready to land.Nov 1 2017, 5:40 PM
This revision was automatically updated to reflect the committed changes.