From 5a3dd943febadd54995010819e2c78e94a5626c4 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Tue, 5 Nov 2024 00:01:56 +0100 Subject: [PATCH] cocoa: fix rendering artefacts in retina displays Set the correct contentsScale in the CALayer instead of using the default (1.0) which causes rendering artefacts in retina displays due to using a smaller bitamp than the display size. See: https://developer.apple.com/documentation/quartzcore/calayer/1410746-contentsscale?language=objc Fix: #3942 Part-of: --- .../gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/subprojects/gst-plugins-base/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 06a8b95047..10b4b03105 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -746,6 +746,10 @@ close_window_cb (gpointer data) return NO; } +- (void)viewDidChangeBackingProperties { + self.layer.contentsScale = [[self window] backingScaleFactor]; +} + @end void