Open totaam opened 3 weeks ago
The easiest solution is to just keep the buffer at the same size as the window.
Which is not the actual resolution used when painting the screen... because of the "scale-factor".
But since the scale factor is always an integer, I guess that's still an improvement?
Slightly slower paint
s, but faster present
. Negligible increase in GPU memory usage.
But, this would completely break scroll
encoding!
Because the scroll instructions sent by the server are pixel perfect for the size it knows about.
If we need to apply any kind of scaling to the coordinates then we end up blitting half lines and things will look horrible.
I guess the only solution is to special case downscaling. Either altogether avoiding any downscaling server side, or keeping the buffer at the unscaled size client side.
When using a
desktop-scaling
value lower than 100%, we should also keep the window's back buffer at the downscaled resolution since screen updates may well arrive at this resolution and this is the resolution we want to paint on screen.Upscaling to the server window size is wasteful and will increase scaling arctifacts.