summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das@noemail.net>2009-08-24 00:55:30 (GMT)
committerdas <das@noemail.net>2009-08-24 00:55:30 (GMT)
commit9e9af775d8bb015804f39d8b28b0f5a3d7052b95 (patch)
tree2fedac17aaa00be1d66090a458d24c8aab8db1a8
parent86ec19a56f40015780d3c77e317496d283bb4d2f (diff)
downloadtk-9e9af775d8bb015804f39d8b28b0f5a3d7052b95.zip
tk-9e9af775d8bb015804f39d8b28b0f5a3d7052b95.tar.gz
tk-9e9af775d8bb015804f39d8b28b0f5a3d7052b95.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) FossilOrigin-Name: 18d5779a7a5d01435637492da6e4fe542227deeb
-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 {