[gtk+/client-side-windows: 266/284] Try to reduce risk of triggering the "beam sync" penalty in quartz



commit 6af4450641204925ef0960548ee5c9de6be5df3d
Author: Richard Hult <richard imendio com>
Date:   Wed Feb 4 10:40:40 2009 +0100

    Try to reduce risk of triggering the "beam sync" penalty in quartz
---
 gdk/quartz/gdkwindow-quartz.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 2a8e9ad..5c01f7c 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -374,6 +374,9 @@ _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
           toplevel_impl = (GdkWindowImplQuartz *)toplevel_private->impl;
           nswindow = toplevel_impl->toplevel;
 
+          /* In theory, we could skip the flush disabling, since we only
+           * have one NSView.
+           */
           if (nswindow && ![nswindow isFlushWindowDisabled]) 
             {
               [nswindow retain];
@@ -393,7 +396,10 @@ _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
 
   g_free (rects);
 
-  [impl->view displayIfNeeded];
+  /* NOTE: I'm not sure if we should displayIfNeeded here. It slows down a
+   * lot (since it triggers the beam syncing) and things seem to work
+   * without it.
+   */
 }
 
 void
@@ -414,6 +420,8 @@ _gdk_windowing_after_process_all_updates (void)
     {
       NSWindow *nswindow = tmp_list->data;
 
+      [[nswindow contentView] displayIfNeeded];
+
       [nswindow enableFlushWindow];
       [nswindow flushWindow];
       [nswindow release];



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