From 29e7f2f06e630fefbe84c3564736ad3f04d32c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 9 Oct 2014 10:54:35 +0300 Subject: gl/cocoa: Add support for HiDPI displays Without this our GL surface would be upscaled after rendering by Cocoa, which would reduce image quality. --- gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m index 339c59327..27b9c3ad4 100644 --- a/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m @@ -494,6 +494,7 @@ close_window_cb (gpointer data) /* Get notified about changes */ [[NSNotificationCenter defaultCenter] addObserver: self selector:@selector(reshape) name: NSViewFrameDidChangeNotification object: self]; + [self setWantsBestResolutionOpenGLSurface:YES]; return self; } @@ -564,6 +565,9 @@ resize_cb (gpointer data) NSRect visibleRect = [self visibleRect]; struct resize *resize_data = g_new (struct resize, 1); + bounds = [self convertRectToBacking:bounds]; + visibleRect = [self convertRectToBacking:visibleRect]; + GST_DEBUG_OBJECT (window, "Window resized: bounds %lf %lf %lf %lf " "visibleRect %lf %lf %lf %lf", bounds.origin.x, bounds.origin.y, -- cgit v1.2.1