mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
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:
parent
ccdd88eb5a
commit
014cbbbb33
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue