dotnet / dotnet/macios

[xcode14][coreimage] LabToRGBFilter and RGBtoLabFilter disabled in bindings

Open
#15,662 0 comments 0 reactions 0 assignees View on GitHub
missing-api-bindings
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 17h
Merged PRs (30d)
108

Description

In Xcode 14 Beta 1, Apple introduced an unorthodox pair of CoreImage filters:

```
++ (CIFilter*) convertLabToRGBFilter NS_AVAILABLE(13_0, 16_0);
++ (CIFilter*) convertRGBtoLabFilter NS_AVAILABLE(13_0, 16_0);
```

These are two separate filters with the same exact type.

I tried binding them as two different types with:

```
[CoreImageFilter]
[iOS (16,0), TV (16,0), Mac (13,0), MacCatalyst (16,0)]
[BaseType (typeof (CIFilter))]
interface LabToRGBFilter : CIConvertLabProtocol
{
}

[CoreImageFilter]
[iOS (16,0), TV (16,0), Mac (13,0), MacCatalyst (16,0)]
[BaseType (typeof (CIFilter))]
interface RGBtoLabFilter : CIConvertLabProtocol
{
}
```
but that fails a number of introspection tests:
```
[FAIL] CoreImage.LabToRGBFilter : Handle
[FAIL] CoreImage.RGBtoLabFilter : Handle
[FAIL] DefaultCtorAllowed : 2 potential errors found in 1668 default ctor validated:
[FAIL] Managed LabToRGBFilter was not part of the native filter list
[FAIL] Managed RGBtoLabFilter was not part of the native filter list
[FAIL] Keys : System.ArgumentNullException : Value cannot be null. (Parameter 'array')
Tests run: 44 Passed: 42 Inconclusive: 0 Failed: 2 Ignored: 1
[FAIL] CoreImage.LabToRGBFilter : Handle
[FAIL] CoreImage.RGBtoLabFilter : Handle
[FAIL] DefaultCtorAllowed : 2 potential errors found in 1672 default ctor validated:
[FAIL] Managed LabToRGBFilter was not part of the native filter list
[FAIL] Managed RGBtoLabFilter was not part of the native filter list
[FAIL] Keys : System.ArgumentNullException : Value cannot be null.
Tests run: 46 Passed: 44 Inconclusive: 0 Failed: 2 Ignored: 0

```

I could bind them as one type, however things would be difficult to use from C# if we did that.

To unblock the rest of CoreImage, I disabled those two and [PR'ed the rest](https://github.com/xamarin/xamarin-macios/pull/15661).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.