macOS - NSFullSizeContentViewWindowMask on VLCVideoView window results in black rendering on secondary display
How to reproduce:
VLCKit -> cf419447
vlc -> 7ac323c
- Using the BasicPlayerWithPlaylist demo, set
(NSFullSizeContentViewWindowMask | NSTitledWindowMask)
as the style mask of the player window.
- (void)awakeFromNib
{
[NSApp setDelegate:self];
// Allocate a VLCVideoView instance and tell it what area to occupy.
NSRect rect = NSMakeRect(0, 0, 0, 0);
rect.size = [videoHolderView frame].size;
[window setStyleMask:NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSFullSizeContentViewWindowMask];
-
Add any video media and click "Play".
-
While playing, drag the player window to a different display.
Expected result:
Player window should be visible and play active media playlist item.
Actual result:
Active playlist item is audible, but not visible.
Other observations:
When any portion of the video view overlaps with the primary screen, visibility is restored.
With the player window placed on the secondary display, toggling the NSFullSizeContentViewWindowMask
on the player window has no effect. Video view is still not visible.
Dragging back to the primary display resolves rendering issue.
NSFullSizeContentViewWindowMask windows opt-in to a layer backed contentView.
No errors or warnings are issued.
Approximately 1.5 years ago this was not a problem (sorry for the ambiguity, if you need precise commits let me know). At the time, CPU usage was approximately 3x higher than the context build. Presumably, this problem is a side-effect of recent OpenGL implementation changes.
Workaround:
Pull version of libvlc/vlc that is prior to OpenGL optimizations.