From 285781724fb30616bff2075c8aaceed3ab2a60d3 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sun, 6 Dec 2020 20:14:52 -0800 Subject: [PATCH] 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. --- gdk/macos/GdkMacosGLView.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdk/macos/GdkMacosGLView.c b/gdk/macos/GdkMacosGLView.c index 64bd0e89c3..7945184c0b 100644 --- a/gdk/macos/GdkMacosGLView.c +++ b/gdk/macos/GdkMacosGLView.c @@ -82,7 +82,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS -(BOOL)isOpaque { - return NO; + if ([self window]) + return [[self window] isOpaque]; + return YES; } -(BOOL)isFlipped