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