diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-10-09 10:54:35 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-10-14 10:01:37 +0200 |
commit | 29e7f2f06e630fefbe84c3564736ad3f04d32c00 (patch) | |
tree | 3ffcd2ccff4d1a69ae4ce1cd3e08fa046affefa3 | |
parent | b183e3e5f778840546deac7c16c8291c376ea693 (diff) | |
download | gstreamer-plugins-bad-29e7f2f06e630fefbe84c3564736ad3f04d32c00.tar.gz |
gl/cocoa: Add support for HiDPI displays
Without this our GL surface would be upscaled after rendering
by Cocoa, which would reduce image quality.
-rw-r--r-- | gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m | 4 |
1 files changed, 4 insertions, 0 deletions
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, |