Commit 983d7b8f authored by egottlieb's avatar egottlieb

Finally figured out how to use autorelease pools.

parent c95526b7
...@@ -86,13 +86,13 @@ int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowS ...@@ -86,13 +86,13 @@ int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowS
data->shape = SDL_CalculateShapeTree(*shapeMode,shape,SDL_FALSE); data->shape = SDL_CalculateShapeTree(*shapeMode,shape,SDL_FALSE);
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSBezierPath* clipPath = [[NSBezierPath bezierPath] autorelease]; NSBezierPath* clipPath = [NSBezierPath bezierPath];
SDL_PathConglomeration cong = {clipPath,shaper->window}; SDL_PathConglomeration cong = {clipPath,shaper->window};
SDL_TraverseShapeTree(data->shape,(SDL_TraversalFunction)&ConglomerateShapeTree,(void*)&cong); SDL_TraverseShapeTree(data->shape,(SDL_TraversalFunction)&ConglomerateShapeTree,(void*)&cong);
SDL_assert([NSGraphicsContext currentContext] != NULL); SDL_assert([NSGraphicsContext currentContext] != Nil);
[clipPath addClip]; [clipPath addClip];
[NSGraphicsContext restoreGraphicsState]; [NSGraphicsContext restoreGraphicsState];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment