-
Notifications
You must be signed in to change notification settings - Fork 507
CoreGraphics watchOS xcode16.0 b1
Rolf Bjarne Kvinge edited this page Aug 14, 2024
·
3 revisions
#CoreGraphics.framework https://github.com/xamarin/xamarin-macios/pull/21033
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h 2024-04-18 08:40:59
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h 2024-05-30 10:36:13
@@ -661,8 +661,18 @@
+/* Set target EDR headroom on a context to be used when rendering HDR content to the context.
+ Context 'c' has to be a bitmap context using either extended or HDR color space and
+ 'headroom' has to be a value greater than 1.0f. Return true on success and false on failure */
+
+CG_EXTERN bool CGContextSetEDRTargetHeadroom(CGContextRef __nonnull c, float headroom) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Return the EDR target headroom of the context `c'. */
+
+CG_EXTERN float CGContextGetEDRTargetHeadroom(CGContextRef c) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
/** Image functions. **/
/* Draw `image' in the rectangular area specified by `rect' in the context
@@ -681,8 +691,34 @@
+typedef CF_ENUM (uint32_t, CGToneMapping) {
+ kCGToneMappingDefault = 0, /* A system default method will be used */
+ kCGToneMappingImageSpecificLumaScaling, /* Implements tone mapping of HDR content associated with the CGImage gain map */
+ kCGToneMappingReferenceWhiteBased, /* Implements a tone curve that preserves SDR contrast and rolls off HDR highlights */
+ kCGToneMappingITURecommended, /* Implements tone mapping based on ITU-R specifications for HDR-to-SDR and SDR-to-HDR conversions assuming mastering peak of 1000 nits */
+ kCGToneMappingEXRGamma, /* Implements Open EXR tone mapping gamma suitable for tone mapping images in extended linear sRGB color space to SDR */
+ kCGToneMappingNone /* Does not apply any tone mapping. Color converted values in extended color spaces will be clipped to SDR ([0.0-1.0]) range */
+} API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+CG_EXTERN bool CGContextDrawImageApplyingToneMapping(CGContextRef __nonnull c, CGRect r, CGImageRef image, CGToneMapping method, CFDictionaryRef __nullable options) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* kCGColorITURecommendedToneMapping allows for using HLG OOTF targeting 100 nits when converting HLG to SDR. */
+CG_EXTERN const CFStringRef kCGUse100nitsHLGOOTF API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* The expected value is a CFBooleanRef (kCFBooleanTrue) */
+
+/* kCGColorITURecommendedToneMapping allows for choosing BT1886 recommended gamma in lieu of CoreVideo Gamma. */
+CG_EXTERN const CFStringRef kCGUseBT1886ForCoreVideoGamma API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* The expected value is a CFBooleanRef (kCFBooleanTrue) */
+
+/* kCGColorITURecommendedToneMapping allows for skipping linear boost when converting non-HDR content (either SDR or extended range) to HDR. */
+CG_EXTERN const CFStringRef kCGSkipBoostToHDR API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* The expected value is a CFBooleanRef (kCFBooleanTrue) */
+
+/* kCGToneMappingEXRGamma allows for specifying custom parameters to override system defaults. */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaDefog API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 0.0f range [0.0f, 0.01f] */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaExposure API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 0.0f range [-10.0f, 10.0f] */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaKneeLow API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 0.0f range [-2.85f, 3.0f] */
+CG_EXTERN const CFStringRef kCGEXRToneMappingGammaKneeHigh API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0)); /* default value: 5.0f range [3.5f, 7.5f] */
+
/* Return the interpolation quality for image rendering of `context'. The
interpolation quality is a gstate parameter which controls the level of
interpolation performed when an image is interpolated (for example, when
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h 2024-04-18 07:10:24
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h 2024-05-30 10:36:12
@@ -202,96 +202,131 @@
+/* Create an image with specified EDR headroom. ColorSpace 'space' must be an
+ extended color space, PQ or HLG. In case of extended color spaces, image
+ components must be either 16-bit or 32-bit float. In case of PQ or HLG
+ color spaces, 16-bit or 32-bit float image components values will be
+ clipped to [0.0, 1.0] range, and other bit depths will be treated as
+ representing [0.0, 1.0] range, same as in 'CGImageCreate' API.
+ The headroom parameter must be either equal 0.0f or be greater or equal 1.0f.
+ When the headroom parameter is 0.0f, the image EDR headroom value will be
+ estimated based on the default headroom of the color space. */
+
+CG_EXTERN CGImageRef __nullable CGImageCreateWithEDRHeadroom(
+ float headroom,
+ size_t width, size_t height,
+ size_t bitsPerComponent, size_t bitsPerPixel, size_t bytesPerRow,
+ CGColorSpaceRef cg_nullable space, CGBitmapInfo bitmapInfo,
+ CGDataProviderRef cg_nullable provider,
+ const CGFloat * __nullable decode, bool shouldInterpolate,
+ CGColorRenderingIntent intent)
+ API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Return image content headroom */
+
+CG_EXTERN float CGImageGetContentHeadroom(CGImageRef cg_nullable image)
+ API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
/* Equivalent to `CFRetain(image)'. */
+/* Return true if `image' should be tone mapped while rendering, false otherwise.
+ Tone mapping results depend on the receiving context.
+ */
+
+CG_EXTERN bool CGImageShouldToneMap(CGImageRef cg_nullable image) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
+/* Return true if `image' contains image specific tone mapping metadata, false otherwise. */
+
+CG_EXTERN bool CGImageContainsImageSpecificToneMappingMetadata(CGImageRef cg_nullable image) API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0));
+
/* Return the UTType of `image'. */
- README
- xcode13.0 Binding Status
- xcode13.1 Binding Status
- xcode13.2 Binding Status
- xcode13.3 Binding Status
- xcode13.4 Binding Status
- xcode14.0 Binding Status
- xcode14.1 Binding Status
- xcode14.2 Binding Status
- xcode14.3 Binding Status
- xcode15.0 Binding Status
- xcode15.1 Binding Status
- xcode15.3 Binding Status
- xcode15.4 Binding Status
- xcode16.0 Binding Status