]> Pileus Git - ~andy/gtk/commitdiff
Try to reduce risk of triggering the "beam sync" penalty in quartz
authorRichard Hult <richard@imendio.com>
Wed, 4 Feb 2009 09:40:40 +0000 (10:40 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:16:29 +0000 (10:16 +0200)
gdk/quartz/gdkwindow-quartz.c

index 2a8e9ad4c3701f9f77358ba6b1211fd7bc12780f..5c01f7cf4586376badb89fc73af605c94decf075 100644 (file)
@@ -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];