Don't allocate a new NSGraphicsContext on every call to QZ_UpdateRects(). SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 21 Aug 2011 10:10:42 -0400
branchSDL-1.2
changeset 5619 8e0dd46ad0e0
parent 5618 a427a0e16ca4
child 5620 ad4ed9f0336f
Don't allocate a new NSGraphicsContext on every call to QZ_UpdateRects().
src/video/quartz/SDL_QuartzVideo.m
--- a/src/video/quartz/SDL_QuartzVideo.m	Sun Aug 21 09:47:43 2011 -0400
+++ b/src/video/quartz/SDL_QuartzVideo.m	Sun Aug 21 10:10:42 2011 -0400
@@ -981,8 +981,7 @@
     
     else {
         CGContextRef cgc = (CGContextRef)
-            [[NSGraphicsContext graphicsContextWithWindow: qz_window]
-                graphicsPort];
+            [[NSGraphicsContext currentContext] graphicsPort];
         QZ_DrawResizeIcon (this);
         CGContextFlush (cg_context);
         CGImageRef image = CGBitmapContextCreateImage (cg_context);