From f5c1ccd75c57c5c82ba73cf4a89d4abc57a8f3ec Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 21 Aug 2011 10:10:42 -0400 Subject: [PATCH] Don't allocate a new NSGraphicsContext on every call to QZ_UpdateRects(). --- src/video/quartz/SDL_QuartzVideo.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index 651d62c1b..b42fed32b 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -981,8 +981,7 @@ static void QZ_UpdateRects (_THIS, int numRects, SDL_Rect *rects) else { CGContextRef cgc = (CGContextRef) - [[NSGraphicsContext graphicsContextWithWindow: qz_window] - graphicsPort]; + [[NSGraphicsContext currentContext] graphicsPort]; QZ_DrawResizeIcon (this); CGContextFlush (cg_context); CGImageRef image = CGBitmapContextCreateImage (cg_context);