Upgrade SpaceWarpNode

This commit is contained in:
Isaac 2026-02-13 12:23:53 +04:00
parent 955d69472c
commit 2a317d87d2
7 changed files with 486 additions and 56 deletions

View file

@ -33,6 +33,7 @@ NSObject * _Nullable makeVariableBlurFilter();
NSObject * _Nullable makeLuminanceToAlphaFilter();
NSObject * _Nullable makeColorInvertFilter();
NSObject * _Nullable makeMonochromeFilter();
NSObject * _Nullable makeDisplacementMapFilter();
void setLayerDisableScreenshots(CALayer * _Nonnull layer, bool disableScreenshots);
bool getLayerDisableScreenshots(CALayer * _Nonnull layer);

View file

@ -282,6 +282,14 @@ NSObject * _Nullable makeMonochromeFilter() {
return [(id<GraphicsFilterProtocol>)NSClassFromString(@"CAFilter") filterWithName:@"colorMonochrome"];
}
NSObject * _Nullable makeDisplacementMapFilter() {
if (@available(iOS 26.0, *)) {
return [(id<GraphicsFilterProtocol>)NSClassFromString(@"CAFilter") filterWithName:@"displacementMap"];
} else {
return nil;
}
}
static const void *layerDisableScreenshotsKey = &layerDisableScreenshotsKey;
void setLayerDisableScreenshots(CALayer * _Nonnull layer, bool disableScreenshots) {