summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-12-15 02:53:13 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-12-15 02:53:13 (GMT)
commitf4326da1c63ed8d0421a5d315255f2b2c402328e (patch)
treecdfc6c636aeca07dd6b45ac7cff0b9b530774284 /macosx/tkMacOSXDraw.c
parent47c6cf375321a9f00b0446e3753d6f9d8c357cd8 (diff)
downloadtk-f4326da1c63ed8d0421a5d315255f2b2c402328e.zip
tk-f4326da1c63ed8d0421a5d315255f2b2c402328e.tar.gz
tk-f4326da1c63ed8d0421a5d315255f2b2c402328e.tar.bz2
Fix for some redraw issues on Tk-Cocoa on OS X 10.11; further refinement of memory management; thanks to Marc Culler for patches
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index b3c2499..f376591 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -138,7 +138,6 @@ BitmapRepFromDrawableRect(
CGImageRef cg_image=NULL, sub_cg_image=NULL;
NSBitmapImageRep *bitmap_rep=NULL;
NSView *view=NULL;
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
if ( mac_drawable->flags & TK_IS_PIXMAP ) {
/*
This means that the MacDrawable is functioning as a Tk Pixmap, so its view
@@ -175,7 +174,6 @@ BitmapRepFromDrawableRect(
} else {
TkMacOSXDbgMsg("Invalid source drawable");
}
- [pool drain];
return bitmap_rep;
}
@@ -1636,7 +1634,6 @@ TkMacOSXSetupDrawingContext(
int dontDraw = 0, isWin = 0;
TkMacOSXDrawingContext dc = {};
CGRect clipBounds;
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
dc.clipRgn = TkMacOSXGetClipRgn(d);
if (!dontDraw) {
@@ -1767,7 +1764,6 @@ end:
dc.clipRgn = NULL;
}
*dcPtr = dc;
- [pool drain];
return !dontDraw;
}
@@ -1791,7 +1787,6 @@ void
TkMacOSXRestoreDrawingContext(
TkMacOSXDrawingContext *dcPtr)
{
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (dcPtr->context) {
CGContextSynchronize(dcPtr->context);
[[dcPtr->view window] setViewsNeedDisplay:YES];
@@ -1808,7 +1803,6 @@ TkMacOSXRestoreDrawingContext(
#ifdef TK_MAC_DEBUG
bzero(dcPtr, sizeof(TkMacOSXDrawingContext));
#endif /* TK_MAC_DEBUG */
- [pool drain];
}
/*
@@ -1834,7 +1828,6 @@ TkMacOSXGetClipRgn(
{
MacDrawable *macDraw = (MacDrawable *) drawable;
HIShapeRef clipRgn = NULL;
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (macDraw->winPtr && macDraw->flags & TK_CLIP_INVALID) {
TkMacOSXUpdateClipRgn(macDraw->winPtr);
@@ -1860,7 +1853,6 @@ TkMacOSXGetClipRgn(
} else if (macDraw->visRgn) {
clipRgn = HIShapeCreateCopy(macDraw->visRgn);
}
- [pool drain];
return clipRgn;
}
@@ -1913,7 +1905,6 @@ TkpClipDrawableToRect(
{
MacDrawable *macDraw = (MacDrawable *) d;
NSView *view = TkMacOSXDrawableView(macDraw);
- NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (macDraw->drawRgn) {
CFRelease(macDraw->drawRgn);
@@ -1947,7 +1938,6 @@ TkpClipDrawableToRect(
macDraw->flags &= ~TK_FOCUSED_VIEW;
}
}
- [pool drain];
}
/*