gl/cocoa: Add support for HiDPI displays

Without this our GL surface would be upscaled after rendering
by Cocoa, which would reduce image quality.
This commit is contained in:
Sebastian Dröge 2014-10-09 10:54:35 +03:00
parent ccdd88eb5a
commit 014cbbbb33

View file

@ -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,