Commit b6f5bdb7 authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

winemac: Work around poor-quality downscaling in high-res/retina mode on macOS 10.13 and earlier.

parent fcd2a5f5
......@@ -680,6 +680,22 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
[self layer].contentsScale = mode ? 2.0 : 1.0;
[self layer].minificationFilter = mode ? kCAFilterLinear : kCAFilterNearest;
[self layer].magnificationFilter = mode ? kCAFilterLinear : kCAFilterNearest;
/* On macOS 10.13 and earlier, the desired minificationFilter seems to be
* ignored and "nearest" filtering is used, which looks terrible.
* Enabling rasterization seems to work around this, only enable
* it when there may be down-scaling (retina mode enabled).
*/
if (floor(NSAppKitVersionNumber) < 1671 /*NSAppKitVersionNumber10_14*/)
{
if (mode)
{
[self layer].shouldRasterize = YES;
[self layer].rasterizationScale = 2.0;
}
else
[self layer].shouldRasterize = NO;
}
}
- (void) setRetinaMode:(int)mode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment