D3498: Add scaling to DRM backend

2017-04-29 Thread David Edmundson
This revision was automatically updated to reflect the committed changes. Closed by commit R108:0dac5d6bfe8c: Add scaling to DRM backend (authored by davidedmundson). REPOSITORY R108 KWin CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D3498?vs=12804&id=13969 REVISION DETAIL https:/

D3498: Add scaling to DRM backend

2017-03-31 Thread Roman Gilg
subdiff added inline comments. INLINE COMMENTS > davidedmundson wrote in drm_output.cpp:104 > It's good design to not have member variables that can ever be in a corrupt > state, it reduces chance for bugs being introduced later, which is why I'm > against changing it. > > Dividing two integer

D3498: Add scaling to DRM backend

2017-03-31 Thread David Edmundson
davidedmundson added inline comments. INLINE COMMENTS > subdiff wrote in drm_output.cpp:104 > geometry() is called several times per frame. We can optimize here when we > don't do the division every time (maybe the compiler already does the saving, > I don't know). > > Also this way we can mak

D3498: Add scaling to DRM backend

2017-03-31 Thread Roman Gilg
subdiff added inline comments. INLINE COMMENTS > davidedmundson wrote in drm_output.cpp:104 > What benefit will that have? geometry() is called several times per frame. We can optimize here when we don't do the division every time (maybe the compiler already does the saving, I don't know). Al

D3498: Add scaling to DRM backend

2017-03-31 Thread David Edmundson
davidedmundson added dependent revisions: D3159: Set wayland output scale, D3494: Set m_client size in global compositor co-ordinates. REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D3498 To: davidedmundson, graesslin, subdiff, #plasma Cc: subdiff, #kwin, plasma-devel, kwi

D3498: Add scaling to DRM backend

2017-03-31 Thread David Edmundson
davidedmundson added inline comments. INLINE COMMENTS > subdiff wrote in drm_output.cpp:104 > Instead of dividing on every call, declare new private variable `QSize > m_scaledSize = pixelSize() / scale()`, and update its value only when m_mode > or the scale value is changed. What benefit will

D3498: Add scaling to DRM backend

2017-03-30 Thread Roman Gilg
subdiff added inline comments. INLINE COMMENTS > drm_output.cpp:104 > { > -return QRect(m_globalPos, size()); > +return QRect(m_globalPos, pixelSize() / scale()); > } Instead of dividing on every call, declare new private variable `QSize m_scaledSize = pixelSize() / scale()`, and upda

D3498: Add scaling to DRM backend

2017-03-30 Thread Roman Gilg
subdiff added a comment. Regarding all your Diffs about Scaling, that you haven't yet merged: Can you edit the Related Revisions in Phab, so it's easier to review them? For example for this diff here https://phabricator.kde.org/D3159 is needed. REPOSITORY R108 KWin REVISION DETAIL https

D3498: Add scaling to DRM backend

2017-03-25 Thread David Edmundson
davidedmundson updated this revision to Diff 12804. davidedmundson added a comment. Restricted Application edited projects, added KWin; removed Plasma. Rename Output::size to Output::pixelSize This mirrors KWayland::Client::Output and is useful to separate the two co-ordinate spaces.

D3498: Add scaling to DRM backend

2017-03-25 Thread Roman Gilg
subdiff requested changes to this revision. subdiff added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > scene_qpainter_drm_backend.cpp:67 > auto initBuffer = [&o, output, this] (int index) { > -o.buffer[index] = m_backend->createBuffer(output->size

D3498: Add scaling to DRM backend

2017-03-25 Thread David Edmundson
davidedmundson updated this revision to Diff 12790. davidedmundson added a comment. Restricted Application edited projects, added Plasma; removed KWin. Restricted Application added a subscriber: KWin. Set m_output as well as m_outputDevice REPOSITORY R108 KWin CHANGES SINCE LAST UPDATE ht

[Differential] [Accepted] D3498: Add scaling to DRM backend

2016-11-25 Thread Martin Gräßlin
graesslin accepted this revision. graesslin added a reviewer: graesslin. This revision is now accepted and ready to land. REPOSITORY rKWIN KWin REVISION DETAIL https://phabricator.kde.org/D3498 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: davidedmunds

[Differential] [Request, 37 lines] D3498: Add scaling to DRM backend

2016-11-25 Thread davidedmundson (David Edmundson)
davidedmundson created this revision. davidedmundson added a reviewer: Plasma. Restricted Application added a project: KWin. Restricted Application added subscribers: kwin, plasma-devel. TEST PLAN For the first time, actually plugged in my high DPI laptop. Tested both 1x and 2x windows on 2 re