Don't allocate a new NSGraphicsContext on every call to QZ_UpdateRects().

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon
2011-08-21 10:10:42 -04:00
parent 230a95fb5f
commit 30bfa18146

View File

@@ -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);