summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2009-08-24 00:55:31 (GMT)
committerdas <das>2009-08-24 00:55:31 (GMT)
commit756e87236145fe779fef07a6d805766282070a58 (patch)
tree2fedac17aaa00be1d66090a458d24c8aab8db1a8 /macosx
parente928c2afeba4b75ce577a9ec8917d7aff091b8b0 (diff)
downloadtk-756e87236145fe779fef07a6d805766282070a58.zip
tk-756e87236145fe779fef07a6d805766282070a58.tar.gz
tk-756e87236145fe779fef07a6d805766282070a58.tar.bz2
* macosx/tkMacOSXDraw.c (TkMacOSX{Setup,Restore}DrawingContext):
Disable window flushing during Tk drawing to avoid immediate flush of NSView-based native widgets on draw. (fixes drawing performance issue reported by Youness Alaoui on tcl-mac)
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDraw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 7964f5f..a867bf7 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.36 2009/08/14 14:50:19 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.37 2009/08/24 00:55:31 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -1565,6 +1565,7 @@ TkMacOSXSetupDrawingContext(
if (dontDraw) {
goto end;
}
+ [[view window] disableFlushWindow];
dc.view = view;
dc.context = [[NSGraphicsContext currentContext] graphicsPort];
dc.portBounds = NSRectToCGRect([view bounds]);
@@ -1690,6 +1691,7 @@ TkMacOSXRestoreDrawingContext(
{
if (dcPtr->context) {
CGContextSynchronize(dcPtr->context);
+ [[dcPtr->view window] enableFlushWindow];
if (dcPtr->focusLocked) {
[dcPtr->view unlockFocus];
} else {