[Differential] [Commented On] D3159: Set wayland output scale

davidedmundson (David Edmundson) noreply at phabricator.kde.org
Mon Nov 7 15:16:36 UTC 2016


davidedmundson added inline comments.

INLINE COMMENTS

> graesslin wrote in scene_qpainter.cpp:311-313
> ah so that's basically the "scale everything up" if output has a scale, but not yet the "surface has a scale of 2"?

What this code is doing is painting in output normalised space; no matter what size buffer the surface happens to have.
This never scales up, it only "scales" down.

Conversion from output normalised to hardware pixels happens in this (pre-existing line)

  m_painter->setWindow(geometry);

Previously this was just a translation, however, because I we create the buffer size*scale , this has a scale too.

So for a 2x buffer on a 1x screen, we scale the image down in this line
For a 2x buffer on a 2x screen, we scale the image down, but because the qpainter is scaled up it cancels out losslessly
For a 1x client on a 2x screen, we paint, but the qpainter is scaled up, so it  looks twice the size.

REPOSITORY
  rKWIN KWin

BRANCH
  scaling

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: davidedmundson, graesslin, #plasma
Cc: broulik, graesslin, plasma-devel, kwin, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161107/69193999/attachment-0001.html>


More information about the Plasma-devel mailing list