Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreImage] Add support for Xcode 15 beta 7. #18874

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 91 additions & 2 deletions src/coreimage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ interface CIContext {
[Field ("kCIContextName")]
NSString Name { get; }

[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Field ("kCIContextMemoryLimit")]
NSString MemoryLimit { get; }

[NoiOS]
[NoMacCatalyst]
[NoWatch]
Expand Down Expand Up @@ -419,6 +423,15 @@ interface CIContext {
[Static]
[Export ("contextWithMTLCommandQueue:options:")]
CIContext Create (IMTLCommandQueue commandQueue, [NullAllowed] NSDictionary<NSString, NSObject> options);

[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Export ("writeOpenEXRRepresentationOfImage:toURL:options:error:")]
bool WriteOpenExrRepresentation (CIImage image, NSUrl url, NSDictionary<NSString, NSObject> options, [NullAllowed] out NSError errorPtr);

[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Export ("OpenEXRRepresentationOfImage:options:error:")]
[return: NullAllowed]
NSData GetOpenEXRRepresentation (CIImage image, NSDictionary<NSString, NSObject> options, [NullAllowed] out NSError errorPtr);
}

[Category]
Expand Down Expand Up @@ -733,6 +746,26 @@ string Name {
[Static]
[Wrap ("CreateRawFilter (pixelBuffer, properties, options.GetDictionary ()!)")]
CIFilter CreateRawFilter (CVPixelBuffer pixelBuffer, NSDictionary properties, CIRawFilterOptions options);

[iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)]
[Static]
[Export ("blurredRectangleGeneratorFilter")]
CIBlurredRectangleGenerator BlurredRectangleGeneratorFilter { get; }

[iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)]
[Static]
[Export ("cannyEdgeDetectorFilter")]
CICannyEdgeDetector CannyEdgeDetectorFilter { get; }

[iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)]
[Static]
[Export ("roundedRectangleStrokeGeneratorFilter")]
CIRoundedRectangleStrokeGenerator RoundedRectangleStrokeGeneratorFilter { get; }

[iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0), TV (17, 0)]
[Static]
[Export ("sobelGradientsFilter")]
CISobelGradients SobelGradientsFilter { get; }
}

[iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (15, 0)]
Expand Down Expand Up @@ -1472,16 +1505,18 @@ interface CIFilterApply {
NSString OptionColorSpace { get; }
}

[NoiOS]
[NoMacCatalyst]
[iOS (17, 0)]
[MacCatalyst (17, 0)]
[NoWatch]
[NoTV]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface CIFilterGenerator : CIFilterConstructor, NSSecureCoding, NSCopying {
[NoiOS, NoMacCatalyst]
[Static, Export ("filterGenerator")]
CIFilterGenerator Create ();

[NoiOS, NoMacCatalyst]
[Static]
[Export ("filterGeneratorWithContentsOfURL:")]
[return: NullAllowed]
Expand Down Expand Up @@ -1521,12 +1556,15 @@ interface CIFilterGenerator : CIFilterConstructor, NSSecureCoding, NSCopying {
[Export ("classAttributes")]
NSDictionary ClassAttributes { get; set; }

[NoiOS, NoMacCatalyst]
[Field ("kCIFilterGeneratorExportedKey", "+CoreImage")]
NSString ExportedKey { get; }

[NoiOS, NoMacCatalyst]
[Field ("kCIFilterGeneratorExportedKeyTargetObject", "+CoreImage")]
NSString ExportedKeyTargetObject { get; }

[NoiOS, NoMacCatalyst]
[Field ("kCIFilterGeneratorExportedKeyName", "+CoreImage")]
NSString ExportedKeyName { get; }
}
Expand Down Expand Up @@ -2134,6 +2172,22 @@ interface CIImage : NSSecureCoding, NSCopying {
[Field ("kCIFormatLAf")]
int FormatLAf { get; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)]
[Field ("kCIFormatRGB10")]
int FormatRgb10 { get; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)]
[Field ("kCIFormatRGBX16")]
int FormatRgbX16 { get; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)]
[Field ("kCIFormatRGBXf")]
int FormatRgbXf { get; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)]
[Field ("kCIFormatRGBXh")]
int FormatRgbXh { get; }

// UIKit extensions
[NoMac]
[MacCatalyst (13, 1)]
Expand Down Expand Up @@ -2504,6 +2558,20 @@ interface CIImageProcessorInput {
[iOS (16, 0), TV (16, 0), Mac (13, 0), MacCatalyst (16, 0)]
[Export ("digest")]
ulong Digest { get; }

#if XAMCORE_5_0
[Abstract]
#endif
[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Export ("roiTileCount")]
nuint RoiTileCount { get; }

#if XAMCORE_5_0
[Abstract]
#endif
[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Export ("roiTileIndex")]
nuint RoiTileIndex { get; }
}

interface ICIImageProcessorOutput { }
Expand Down Expand Up @@ -3184,6 +3252,11 @@ interface CIImageProcessorKernel {
[Static]
[Export ("outputIsOpaque")]
bool OutputIsOpaque { get; }

[iOS (17, 0), MacCatalyst (17, 0), TV (17, 0), Mac (14, 0)]
[Static]
[Export ("roiTileArrayForInput:arguments:outputRect:")]
CIVector [] GetRoiTileArray (int input, [NullAllowed] NSDictionary<NSString, NSObject> arguments, CGRect outputRect);
}

[CoreImageFilter]
Expand Down Expand Up @@ -5996,6 +6069,10 @@ interface CIRenderInfo {

[Export ("pixelsProcessed")]
nint PixelsProcessed { get; }

[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Export ("kernelCompileTime")]
double KernelCompileTime { get; }
}

[MacCatalyst (13, 1)]
Expand Down Expand Up @@ -6090,6 +6167,18 @@ partial interface CIImageRepresentationKeys {
[MacCatalyst (14, 3)]
[Field ("kCIImageRepresentationSemanticSegmentationSkyMatteImage")]
NSString SemanticSegmentationSkyMatteImage { get; }

[iOS (14, 1), TV (14, 1), Mac (11, 0), MacCatalyst (14, 1)]
[Field ("kCIImageAuxiliaryHDRGainMap")]
NSString AuxiliaryHdrGainMap { get; }

[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Field ("kCIImageCacheImmediately")]
NSString CacheImmediately { get; }

[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0)]
[Field ("kCIImageExpandToHDR")]
NSString ExpandToHdr { get; }
}

[MacCatalyst (13, 1)]
Expand Down
3 changes: 3 additions & 0 deletions tests/introspection/ApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ protected virtual bool Skip (Type type)
// was removed by apple and is a compat class.
case "HMMatterRequestHandler":
return true;
case "CIFilterGenerator":
// only present on device :/
return TestRuntime.IsSimulatorOrDesktop;
default:
return SkipDueToAttribute (type);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,9 @@
## xcode 14
!missing-selector! +CIFilter::areaLogarithmicHistogramFilter not bound
!missing-selector! +CIFilter::convertLabToRGBFilter not bound
!missing-selector! +CIFilter::convertRGBtoLabFilter not bound
!missing-selector! +CIFilter::convertRGBtoLabFilter not bound
mandel-macaque marked this conversation as resolved.
Show resolved Hide resolved
# xcode1 5
!incorrect-protocol-member! CIPhotoEffect::setExtrapolate: is REQUIRED and should be abstract
!incorrect-protocol-member! CIPhotoEffect::extrapolate is REQUIRED and should be abstract
!incorrect-protocol-member! CIImageProcessorInput::roiTileCount is REQUIRED and should be abstract
!incorrect-protocol-member! CIImageProcessorInput::roiTileIndex is REQUIRED and should be abstract
35 changes: 0 additions & 35 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-CoreImage.todo

This file was deleted.

20 changes: 0 additions & 20 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-CoreImage.todo

This file was deleted.

20 changes: 0 additions & 20 deletions tests/xtro-sharpie/api-annotations-dotnet/tvOS-CoreImage.todo

This file was deleted.

7 changes: 6 additions & 1 deletion tests/xtro-sharpie/common-CoreImage.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,9 @@
## xcode 14
!missing-selector! +CIFilter::areaLogarithmicHistogramFilter not bound
!missing-selector! +CIFilter::convertLabToRGBFilter not bound
!missing-selector! +CIFilter::convertRGBtoLabFilter not bound
!missing-selector! +CIFilter::convertRGBtoLabFilter not bound
# xcode1 5
!incorrect-protocol-member! CIPhotoEffect::setExtrapolate: is REQUIRED and should be abstract
!incorrect-protocol-member! CIPhotoEffect::extrapolate is REQUIRED and should be abstract
!incorrect-protocol-member! CIImageProcessorInput::roiTileCount is REQUIRED and should be abstract
!incorrect-protocol-member! CIImageProcessorInput::roiTileIndex is REQUIRED and should be abstract
35 changes: 0 additions & 35 deletions tests/xtro-sharpie/iOS-CoreImage.todo

This file was deleted.

20 changes: 0 additions & 20 deletions tests/xtro-sharpie/macOS-CoreImage.todo

This file was deleted.

20 changes: 0 additions & 20 deletions tests/xtro-sharpie/tvOS-CoreImage.todo

This file was deleted.

Loading