[gtk/wip/chergert/gdk-macos-for-master: 1/3] macos: set opengl view as opaque in opaque windows




commit 285781724fb30616bff2075c8aaceed3ab2a60d3
Author: Christian Hergert <chergert redhat com>
Date:   Sun Dec 6 20:14:52 2020 -0800

    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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]