[gtk/wip/chergert/macos-perf-fixes: 6/7] macos: only flush when not attached
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/macos-perf-fixes: 6/7] macos: only flush when not attached
- Date: Mon, 8 Feb 2021 19:22:18 +0000 (UTC)
commit 65296228d7b8de0d1c6c561c4cd19195d36488fd
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 8 09:53:46 2021 -0800
macos: only flush when not attached
This makes it so we only flush the context for the NSView, not the context
that is the center of our center of the GL context spokes.
gdk/macos/gdkmacosglcontext.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c
index 8dd6bc2e00..28b3ed7ac7 100644
--- a/gdk/macos/gdkmacosglcontext.c
+++ b/gdk/macos/gdkmacosglcontext.c
@@ -362,7 +362,8 @@ gdk_macos_gl_context_end_frame (GdkDrawContext *context,
GDK_DRAW_CONTEXT_CLASS (gdk_macos_gl_context_parent_class)->end_frame (context, painted);
- [self->gl_context flushBuffer];
+ if (!self->is_attached)
+ [self->gl_context flushBuffer];
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]