diff options
Diffstat (limited to 'frontends/cocoa/bitmap.m')
-rw-r--r-- | frontends/cocoa/bitmap.m | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/frontends/cocoa/bitmap.m b/frontends/cocoa/bitmap.m index 1ab8c3e2f..fe611f118 100644 --- a/frontends/cocoa/bitmap.m +++ b/frontends/cocoa/bitmap.m @@ -41,7 +41,16 @@ #define ALPHA_OFFSET (3) static CGImageRef cocoa_prepare_bitmap( void *bitmap ); -static NSMapTable *cocoa_get_bitmap_cache( void ); +//static NSMapTable *cocoa_get_bitmap_cache( void ); + +static inline NSMapTable *cocoa_get_bitmap_cache( void ) +{ + static NSMapTable *cache = nil; + if (cache == nil) { + cache = NSCreateMapTable( NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0 ); + } + return cache; +} static int bitmap_get_width(void *bitmap) { @@ -179,14 +188,6 @@ CGImageRef cocoa_get_cgimage( void *bitmap ) return result; } -static inline NSMapTable *cocoa_get_bitmap_cache( void ) -{ - static NSMapTable *cache = nil; - if (cache == nil) { - cache = NSCreateMapTable( NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0 ); - } - return cache; -} static CGImageRef cocoa_prepare_bitmap( void *bitmap ) { |