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

Support macOS scale factors other than "native Retina" #628

Open
marceltaeumel opened this issue Apr 28, 2022 · 1 comment
Open

Support macOS scale factors other than "native Retina" #628

marceltaeumel opened this issue Apr 28, 2022 · 1 comment

Comments

@marceltaeumel
Copy link
Contributor

As of 2d7105d, the image side can access native pixels only for "native Retina" scale factors as the platform code only considers the backingScaleFactor. Currently, this will only change between "1.0" and "2.0" depending on your display. Maybe at some day, there will be displays with "3.0". Who knows.

It would be nice if we could also support that other/older scaling, which mimicks other resolutions.

@marceltaeumel
Copy link
Contributor Author

http://lists.squeakfoundation.org/pipermail/vm-dev/2022-April/037924.html

One small comment is that factors others than 1.0 or 2.0 are not an "older" form of scaling, but what latest MacOS does today on the latest apple hardware.

Anyway It seems it can not be done. See https://stackoverflow.com/questions/53551692/how-to-render-each-pixel-of-a-bitmap-texture-to-each-native-physical-pixel-of-th#53563363 . Metal insists on an internal 2x buffer and resampling everything.

So, having a higher resolution in Smalltalk's Display than physical screen will waste some RAM and create slight downscaling artifacts, but it is indeed better than using lower resolution Smalltalk Display and have worse upscaling artifacts.

Besides, knowledgeable users can set their MacOS display to "half resolution" (actually the default) or use EasyRes or the like to set MacOS display to full retina resolution. Both this options give a Smalltalk display with true LCD physical resolution.

In short, I think the current behavior is the best we can have on MacOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant