#import #import #import #import "DYUniforms.h" #import "DYToolState.h" @interface DYRenderer : NSObject /// Decode and upload before committing a host parameter. The renderer retains /// the immutable selected contents independently of the thumbnail cache. - (NSProgress *)prepareLUTPath:(NSString *)path completion:(void (^)(NSError *error))completion; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths error:(NSError**)error; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider error:(NSError**)error; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools error:(NSError**)error; - (NSData*)preview; /// 256-bin luma/R/G/B of the existing 320×180 analysis preview. - (NSData*)histogram; /// Display-encoded float RGBA, 320×180, with the visually top row first. /// Analysis preview retains the host texture's original row order separately. - (NSData*)lookLUTPreview; - (void)invalidatePreview; /// Final-output scopes run only while the auxiliary workspace is visible. - (void)setScopeEnabled:(BOOL)enabled; /// Call after the final destination render succeeds, while the tile is valid. /// Only the small GPU readback waits here; conversion/statistics are coalesced /// on a worker. No main-queue wait or host API is performed by this method. - (void)captureScopeTile:(FxImageTile *)tile atTime:(CMTime)time; /// Straight float RGBA, 320x180, visually top row first. Consult metadata domain. - (NSData *)scopePreview; /// Includes waveform/parade RGBA8 rasters, histogram and honest color-domain labels. - (NSDictionary *)scopeMetadata; - (NSDictionary*)colorContext; - (BOOL)renderSource:(FxImageTile*)source destination:(FxImageTile*)destination uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state hostPrimaries:(NSInteger)primaries error:(NSError**)error; - (BOOL)exportLUT:(NSURL*)url uniforms:(DYUniforms)uniforms paths:(NSDictionary*)paths spider:(NSData*)spider tools:(NSDictionary*)tools colorManagement:(NSDictionary*)state error:(NSError**)error; @end