For the first time, actually plugged in my high DPI laptop.
Tested both 1x and 2x windows on 2 real displays one high DPI, one normal
Rename Output::size to Output::pixelSize
This mirrors KWayland::Client::Output and is useful
to separate the two co-ordinate spaces.
We have this for buffers, and we use geometry when
we want it all normalised.
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.
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 make sure, that the subsequent rounding is not fluctuating from one frame to another.
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 integers is not going to make any performance difference whatsoever and an int divided by an int will result in the same every single time.
Ok, fine with me. Can you now expand the testing parameter from the other Diff, so it's possible to use it in DRM mode? I tried to set a hard coded value in DrmOutput::setScale in order to test different scale factors, but the results were garbage, so I think (hope) that this hard coding doesn't set the scale factors elsewhere correctly and the testing parameter is necessary.