Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downscale just once #4331

Open
totaam opened this issue Aug 16, 2024 · 2 comments
Open

downscale just once #4331

totaam opened this issue Aug 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 16, 2024

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.

@totaam
Copy link
Collaborator Author

totaam commented Aug 16, 2024

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 paints, but faster present. Negligible increase in GPU memory usage.

@totaam
Copy link
Collaborator Author

totaam commented Aug 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant