Record film and channel mixer reference evidence; protect 1.4.3 baseline

这个提交包含在:
mac 于 2026-11-02 13:38:30 +08:00 提交
1 父节点 b640b5da06
当前提交 a249436776
2 个文件已更改
+55

没有与搜索条件相匹配的文件

+24
查看文件
@@ -0,0 +1,24 @@
// Read-only research probe. Loads only the user's installed reference framework.
// No reference binary, texture, preset or disassembly is bundled with Dayu.
#import <Foundation/Foundation.h>
#import <CoreImage/CoreImage.h>
#import <objc/runtime.h>
#include <dlfcn.h>
int main(int argc,const char **argv){@autoreleasepool{
NSString *path=@"/Applications/ColorFinale.app/Contents/PlugIns/ColorFinale.pluginkit/Contents/Frameworks/RenderingEngine.framework/Versions/A/RenderingEngine";
void *handle=dlopen(path.fileSystemRepresentation,RTLD_NOW|RTLD_LOCAL);
if(!handle){fprintf(stderr,"%s\n",dlerror());return 1;}
NSMutableDictionary *out=[NSMutableDictionary dictionary];
for(NSString *name in @[@"FTChannelMixerFilter",@"FTFilmSaturationFilter",@"FTHalationFilter",@"FTBloomFilter",@"FTGrainFilter",@"FTGrainProcessor"]){
Class cls=NSClassFromString(name);NSMutableDictionary *entry=[NSMutableDictionary dictionary];
for(int meta=0;meta<2;meta++){
unsigned count=0;Method *methods=class_copyMethodList(meta?object_getClass(cls):cls,&count);NSMutableArray *list=[NSMutableArray array];
for(unsigned i=0;i<count;i++)[list addObject:@{@"selector":NSStringFromSelector(method_getName(methods[i])),@"encoding":@(method_getTypeEncoding(methods[i]))}];free(methods);entry[meta?@"class":@"instance"]=list;
}
if([cls isSubclassOfClass:CIFilter.class]){@try{CIFilter *filter=[[cls alloc]init];[filter setDefaults];entry[@"attributes"]=filter.attributes?:@{};entry[@"inputKeys"]=filter.inputKeys?:@[];}@catch(NSException *e){entry[@"exception"]=e.reason;}}
out[name]=entry;
}
NSData *json=[NSJSONSerialization dataWithJSONObject:out options:NSJSONWritingPrettyPrinted|NSJSONWritingSortedKeys error:nil];
if(!json)return 2;fwrite(json.bytes,1,json.length,stdout);fputc('\n',stdout);return 0;
}}