Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created October 23, 2023 16:31
Show Gist options
  • Save vs-mobiletools-engineering-service2/a7e09807e49eff59f1c82ea7019f94b9 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/a7e09807e49eff59f1c82ea7019f94b9 to your computer and use it in GitHub Desktop.
previous-api-comparison/mac-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.Mac SDK API diff
List of API changes for Xamarin.Mac.
spouliot
sepoulio
10/23/2023
article
f833f3cb-eea7-c1b8-a706-dfbb597746ea
xamarin

Xamarin.Mac SDK API diff

Namespace ObjCRuntime

Type Changed: ObjCRuntime.Constants

Added field:

public static const string MetalFXLibrary = "/System/Library/Frameworks/MetalFX.framework/MetalFX";

New Namespace MetalFX

New Type: MetalFX.IMTLFXSpatialScaler

public interface IMTLFXSpatialScaler : ObjCRuntime.INativeObject, System.IDisposable {
	// properties
	public virtual MTLFXSpatialScalerColorProcessingMode ColorProcessingMode { get; }
	public virtual Metal.IMTLTexture ColorTexture { get; set; }
	public virtual Metal.MTLPixelFormat ColorTextureFormat { get; }
	public virtual Metal.MTLTextureUsage ColorTextureUsage { get; }
	public virtual Metal.IMTLFence Fence { get; set; }
	public virtual nuint InputContentHeight { get; set; }
	public virtual nuint InputContentWidth { get; set; }
	public virtual nuint InputHeight { get; }
	public virtual nuint InputWidth { get; }
	public virtual nuint OutputHeight { get; }
	public virtual Metal.IMTLTexture OutputTexture { get; set; }
	public virtual Metal.MTLPixelFormat OutputTextureFormat { get; }
	public virtual Metal.MTLTextureUsage OutputTextureUsage { get; }
	public virtual nuint OutputWidth { get; }
	// methods
	public virtual void Encode (Metal.IMTLCommandBuffer commandBuffer);
}

New Type: MetalFX.IMTLFXTemporalScaler

public interface IMTLFXTemporalScaler : ObjCRuntime.INativeObject, System.IDisposable {
	// properties
	public virtual Metal.IMTLTexture ColorTexture { get; set; }
	public virtual Metal.MTLPixelFormat ColorTextureFormat { get; }
	public virtual Metal.MTLTextureUsage ColorTextureUsage { get; }
	public virtual bool DepthReversed { get; set; }
	public virtual Metal.IMTLTexture DepthTexture { get; set; }
	public virtual Metal.MTLPixelFormat DepthTextureFormat { get; }
	public virtual Metal.MTLTextureUsage DepthTextureUsage { get; }
	public virtual Metal.IMTLTexture ExposureTexture { get; set; }
	public virtual Metal.IMTLFence Fence { get; set; }
	public virtual nuint InputContentHeight { get; set; }
	public virtual float InputContentMaxScale { get; }
	public virtual float InputContentMinScale { get; }
	public virtual nuint InputContentWidth { get; set; }
	public virtual nuint InputHeight { get; }
	public virtual nuint InputWidth { get; }
	public virtual float JitterOffsetX { get; set; }
	public virtual float JitterOffsetY { get; set; }
	public virtual Metal.IMTLTexture MotionTexture { get; set; }
	public virtual Metal.MTLPixelFormat MotionTextureFormat { get; }
	public virtual Metal.MTLTextureUsage MotionTextureUsage { get; }
	public virtual float MotionVectorScaleX { get; set; }
	public virtual float MotionVectorScaleY { get; set; }
	public virtual nuint OutputHeight { get; }
	public virtual Metal.IMTLTexture OutputTexture { get; set; }
	public virtual Metal.MTLPixelFormat OutputTextureFormat { get; }
	public virtual Metal.MTLTextureUsage OutputTextureUsage { get; }
	public virtual nuint OutputWidth { get; }
	public virtual float PreExposure { get; set; }
	public virtual bool Reset { get; set; }
	// methods
	public virtual void Encode (Metal.IMTLCommandBuffer commandBuffer);
}

New Type: MetalFX.MTLFXSpatialScalerColorProcessingMode

[Serializable]
public enum MTLFXSpatialScalerColorProcessingMode {
	Hdr = 2,
	Linear = 1,
	Perceptual = 0,
}

New Type: MetalFX.MTLFXSpatialScalerDescriptor

public class MTLFXSpatialScalerDescriptor : Foundation.NSObject {
	// constructors
	protected MTLFXSpatialScalerDescriptor (Foundation.NSObjectFlag t);
	protected MTLFXSpatialScalerDescriptor (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual MTLFXSpatialScalerColorProcessingMode ColorProcessingMode { get; set; }
	public virtual Metal.MTLPixelFormat ColorTextureFormat { get; set; }
	public virtual nuint InputHeight { get; set; }
	public virtual nuint InputWidth { get; set; }
	public virtual nuint OutputHeight { get; set; }
	public virtual Metal.MTLPixelFormat OutputTextureFormat { get; set; }
	public virtual nuint OutputWidth { get; set; }
	// methods
	public virtual IMTLFXSpatialScaler Create (Metal.IMTLDevice device);
	public static bool SupportsDevice (Metal.IMTLDevice device);
}

New Type: MetalFX.MTLFXTemporalScalerDescriptor

public class MTLFXTemporalScalerDescriptor : Foundation.NSObject {
	// constructors
	protected MTLFXTemporalScalerDescriptor (Foundation.NSObjectFlag t);
	protected MTLFXTemporalScalerDescriptor (IntPtr handle);
	// properties
	public virtual bool AutoExposureEnabled { get; set; }
	public override IntPtr ClassHandle { get; }
	public virtual Metal.MTLPixelFormat ColorTextureFormat { get; set; }
	public virtual Metal.MTLPixelFormat DepthTextureFormat { get; set; }
	public virtual float InputContentMaxScale { get; set; }
	public virtual float InputContentMinScale { get; set; }
	public virtual bool InputContentPropertiesEnabled { get; set; }
	public virtual nuint InputHeight { get; set; }
	public virtual nuint InputWidth { get; set; }
	public virtual Metal.MTLPixelFormat MotionTextureFormat { get; set; }
	public virtual nuint OutputHeight { get; set; }
	public virtual Metal.MTLPixelFormat OutputTextureFormat { get; set; }
	public virtual nuint OutputWidth { get; set; }
	// methods
	public virtual IMTLFXTemporalScaler Create (Metal.IMTLDevice device);
	public static float GetSupportedInputContentMaxScale (Metal.IMTLDevice device);
	public static float GetSupportedInputContentMinScale (Metal.IMTLDevice device);
	public static bool SupportsDevice (Metal.IMTLDevice device);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment