macos: set opengl view as opaque in opaque windows

We don't need the OpenGL view to be transparent if the window itself
is not transparent. This has the potential to speed up the compositing
of the GL view onto the NSWindow.
This commit is contained in:
Christian Hergert 2020-12-06 20:14:52 -08:00
parent 2d103cf80c
commit 285781724f

View File

@ -82,7 +82,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-(BOOL)isOpaque -(BOOL)isOpaque
{ {
return NO; if ([self window])
return [[self window] isOpaque];
return YES;
} }
-(BOOL)isFlipped -(BOOL)isFlipped