Skip to content

Commit

Permalink
Don't allocate a new NSGraphicsContext on every call to QZ_UpdateRect…
Browse files Browse the repository at this point in the history
…s().
  • Loading branch information
icculus committed Aug 21, 2011
1 parent 584e09c commit f5c1ccd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -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);
Expand Down

0 comments on commit f5c1ccd

Please sign in to comment.