--- /dev/null 2019-06-19 14:03:07.000000000 +0530 +++ new/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexturePool.h 2019-06-19 14:03:06.000000000 +0530 @@ -0,0 +1,37 @@ +#ifndef MTLTexturePool_h_Included +#define MTLTexturePool_h_Included +#import + +@interface MTLTexturePoolItem : NSObject +{ +@private + +id texture; +bool isBusy; +} + +@property (readwrite, retain) id texture; +@property (readwrite, assign) bool isBusy; + +- (id) initWithTexture:(id)tex; +@end + +// NOTE: owns all MTLTexture objects +@interface MTLTexturePool : NSObject +{ +@private + +id device; +NSMutableArray * pool; +} + +@property (readwrite, assign) id device; +@property (readwrite, retain) NSMutableArray * pool; + +- (id) initWithDevice:(id)device; +- (id) getTexture:(int)width height:(int)height format:(MTLPixelFormat)format; +- (void) markTextureFree:(id)texture; +- (void) markAllTexturesFree; +@end + +#endif /* MTLTexturePool_h_Included */