D8600: Render GL Window decorations at the correct scale
David Edmundson
noreply at phabricator.kde.org
Wed Nov 1 17:09:59 UTC 2017
davidedmundson created this revision.
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: KWin.
Restricted Application added subscribers: KWin, kwin, plasma-devel.
REVISION 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
REPOSITORY
R108 KWin
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D8600
AFFECTED FILES
decorations/decorationrenderer.cpp
plugins/scenes/opengl/scene_opengl.cpp
plugins/scenes/qpainter/scene_qpainter.cpp
plugins/scenes/xrender/scene_xrender.cpp
scene.cpp
scene.h
toplevel.cpp
toplevel.h
To: davidedmundson, #plasma
Cc: plasma-devel, kwin, #kwin, bwowk, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171101/6535c507/attachment-0001.html>
More information about the Plasma-devel
mailing list