Skip to content

IOSurface iOS xcode14.0 beta1

Manuel de la Pena edited this page Aug 18, 2022 · 3 revisions

#IOSurface.framework https://github.com/xamarin/xamarin-macios/pull/15706

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h	2022-02-23 07:58:03.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h	2022-05-31 14:48:36.000000000 -0400
@@ -102,6 +102,9 @@
 /* IOSurfacePropertyKeyPixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU.  Default is true.  */
 extern IOSurfacePropertyKey IOSurfacePropertyKeyPixelSizeCastingAllowed     API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
 
+/* IOSurfacePropertyKeyName - Provide a name for the surface at creation time. */
+extern IOSurfacePropertyKey IOSurfacePropertyKeyName                        API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0));
+
 // Note: IOSurface objects are "toll free bridged" to IOSurfaceRef objects
 API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0))
 @interface IOSurface : NSObject <NSSecureCoding>
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h	2022-02-23 07:08:42.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h	2022-05-31 15:01:39.000000000 -0400
@@ -112,6 +112,11 @@
 /* kIOSurfacePlaneComponentBitOffsets   - CFArray[CFNumber] for bit offset of each component in this plane, (low bit zero, high bit 7). For example 'BGRA' would be {0, 8, 16, 24} */
 extern const CFStringRef kIOSurfacePlaneComponentBitOffsets                 API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
 
+// This key may be used to specify a name for the IOSurface either at creation time, or may be used with IOSurfaceSetValue() to
+// set it dynamically.  If not provided, the name will be set based on the binary containing the address calling into IOSurface.framework
+// to create it.
+extern const CFStringRef kIOSurfaceName                                     API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
+
 typedef CF_ENUM(int32_t, IOSurfaceComponentName) {
     kIOSurfaceComponentNameUnknown      = 0,
     kIOSurfaceComponentNameAlpha        = 1,
@@ -414,11 +419,11 @@
 int32_t IOSurfaceGetUseCount(IOSurfaceRef buffer)
     API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
 
-/* Returns true of an IOSurface is in use by any process in the system, otherwise false. */
+/* Returns true if an IOSurface is in use by any process in the system, otherwise false. */
 Boolean IOSurfaceIsInUse(IOSurfaceRef buffer)
     API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
 
-/* Rerturns true if this IOSurface allows pixel size casting */
+/* Returns true if this IOSurface allows pixel size casting */
 Boolean IOSurfaceAllowsPixelSizeCasting(IOSurfaceRef buffer)
     API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
 
Clone this wiki locally