#import @protocol PTMetalCommandBuffer @optional - (void)beginSynchronization; - (void)endSynchronization:(NSError*)error; @end @interface MetalCommandBuffer : NSObject @property(nonatomic, strong, readonly) id buffer; @property(nonatomic, assign, readonly) BOOL valid; + (MetalCommandBuffer*)newBuffer; + (MetalCommandBuffer*)currentBuffer; - (void)addSubscriber:(id)subscriber; - (void)removeSubscriber:(id)subscriber; - (void)commit; - (void)add:(MPSTemporaryImage*)image; - (void)remove:(MPSTemporaryImage*)image; @end