chore(macos): vendor system-sdk dependency
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* IOSurface.h
|
||||
* IOSurface
|
||||
*
|
||||
* Copyright 2006-2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IOSURFACE_H
|
||||
#define IOSURFACE_H 1
|
||||
|
||||
#include <IOSurface/IOSurfaceBase.h>
|
||||
#include <IOSurface/IOSurfaceAPI.h>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* IOSurfaceAPI.h
|
||||
* IOSurface
|
||||
*
|
||||
* Copyright 2006-2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IOSURFACE_API_H
|
||||
#define IOSURFACE_API_H 1
|
||||
|
||||
/* For legacy reasons, IOSurfaceAPI.h must also include <IOKit/IOKitLib.h> and <xpc/xpc.h> */
|
||||
#include <xpc/xpc.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOSurface/IOSurfaceBase.h>
|
||||
#include <IOSurface/IOSurfaceTypes.h>
|
||||
#include <IOSurface/IOSurfaceRef.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
CF_IMPLICIT_BRIDGING_ENABLED
|
||||
CF_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/* This call lets you get an xpc_object_t that holds a reference to the IOSurface.
|
||||
Note: Any live XPC objects created from an IOSurfaceRef implicity increase the IOSurface's global use
|
||||
count by one until the object is destroyed. */
|
||||
xpc_object_t IOSurfaceCreateXPCObject(IOSurfaceRef aSurface) XPC_RETURNS_RETAINED API_AVAILABLE(macos(10.7), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
/* This call lets you take an xpc_object_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it. */
|
||||
IOSurfaceRef _Nullable IOSurfaceLookupFromXPCObject(xpc_object_t xobj) CF_RETURNS_RETAINED API_AVAILABLE(macos(10.7), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
CF_ASSUME_NONNULL_END
|
||||
CF_IMPLICIT_BRIDGING_DISABLED
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* IOSurfaceBase.h
|
||||
* IOSurface
|
||||
*
|
||||
* Copyright 2006-2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IOSURFACE_BASE_H
|
||||
#define IOSURFACE_BASE_H
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include <Availability.h>
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
#if defined(IOSFC_BUILDING_IOSFC)
|
||||
# define IOSFC_DEPRECATED_MSG(s)
|
||||
# define IOSFC_IOS_DEPRECATED_MSG(s)
|
||||
#else /* !defined(IOSFC_BUILDING_IOSFC) */
|
||||
# define IOSFC_DEPRECATED_MSG(s) DEPRECATED_MSG_ATTRIBUTE(s)
|
||||
#if TARGET_OS_IPHONE
|
||||
# define IOSFC_IOS_DEPRECATED_MSG(s) DEPRECATED_MSG_ATTRIBUTE(s)
|
||||
#else
|
||||
# define IOSFC_IOS_DEPRECATED_MSG(s)
|
||||
#endif
|
||||
#endif /* !defined(IOSFC_BUILDING_IOSFC) */
|
||||
|
||||
#if __has_feature(objc_class_property)
|
||||
#define IOSFC_SWIFT_NAME(name) __attribute__((swift_name(#name)))
|
||||
#else
|
||||
#define IOSFC_SWIFT_NAME(name)
|
||||
#endif
|
||||
|
||||
#include <mach/kern_return.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#if TARGET_OS_OSX
|
||||
#include <xpc/xpc.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* IOSurfaceObjC.h
|
||||
* IOSurface Objective C Interface
|
||||
*
|
||||
* Copyright 2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IOSURFACE_OBJC_H
|
||||
#define IOSURFACE_OBJC_H 1
|
||||
|
||||
#if defined(__OBJC__)
|
||||
|
||||
#import <IOSurface/IOSurfaceTypes.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#if !defined(NS_STRING_ENUM)
|
||||
#define NS_STRING_ENUM
|
||||
#endif
|
||||
|
||||
typedef NSString *IOSurfacePropertyKey NS_STRING_ENUM;
|
||||
|
||||
/* The following list of properties are used with the CFDictionary passed to IOSurfaceCreate(). */
|
||||
|
||||
/* IOSurfacePropertyKeyAllocSize - NSNumber of the total allocation size of the buffer including all planes.
|
||||
Defaults to BufferHeight * BytesPerRow if not specified. Must be specified for
|
||||
dimensionless buffers. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyAllocSize API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
|
||||
|
||||
/* IOSurfacePropertyKeyWidth - NSNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyHeight - NSNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyBytesPerRow - NSNumber for the bytes per row of the buffer. If not specified, IOSurface will first calculate
|
||||
the number full elements required on each row (by rounding up), multiplied by the bytes per element for this surface.
|
||||
That value will then be appropriately aligned. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyBytesPerRow API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Optional properties for non-planar two dimensional images */
|
||||
|
||||
/* IOSurfacePropertyKeyBytesPerElement - NSNumber for the total number of bytes in an element. Default to 1. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyBytesPerElement API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyElementWidth - NSNumber for how many pixels wide each element is. Defaults to 1. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyElementWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyElementHeight - NSNumber for how many pixels high each element is. Defaults to 1. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyElementHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyOffset - NSNumber for the starting offset into the buffer. Defaults to 0. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyOffset API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Properties for planar surface buffers */
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneInfo - NSArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneInfo API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneWidth - NSNumber for the width of this plane in pixels. Required for image planes. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneHeight - NSNumber for the height of this plane in pixels. Required for image planes. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneBytesPerRow - NSNumber for the bytes per row of this plane. If not specified, IOSurface will first calculate
|
||||
the number full elements required on each row (by rounding up), multiplied by the bytes per element for this plane.
|
||||
That value will then be appropriately aligned. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneBytesPerRow API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneOffset - NSNumber for the offset into the buffer for this plane. If not specified then IOSurface
|
||||
will lay out each plane sequentially based on the previous plane's allocation size. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneOffset API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneSize - NSNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneSize API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Optional properties for planar surface buffers */
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneBase - NSNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneBase API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneBytesPerElement - NSNumber for the bytes per element of this plane. Optional, default is 1. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneBytesPerElement API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneElementWidth - NSNumber for the element width of this plane. Optional, default is 1. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneElementWidth API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPlaneElementHeight - NSNumber for the element height of this plane. Optional, default is 1. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPlaneElementHeight API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Optional properties global to the entire IOSurface */
|
||||
|
||||
/* IOSurfacePropertyKeyCacheMode - NSNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyCacheMode API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* IOSurfacePropertyKeyPixelFormat - NSNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format */
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyKeyPixelFormat API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* 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));
|
||||
|
||||
// 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>
|
||||
{
|
||||
@package
|
||||
void * _impl;
|
||||
}
|
||||
|
||||
/* Create a new IOSurface */
|
||||
- (nullable instancetype)initWithProperties:(NSDictionary <IOSurfacePropertyKey, id> *)properties;
|
||||
|
||||
/* "Lock" or "Unlock" a IOSurface for reading or writing.
|
||||
|
||||
The term "lock" is used loosely in this context, and is simply used along with the
|
||||
"unlock" information to put a bound on CPU access to the raw IOSurface data.
|
||||
|
||||
If the seed parameter is non-NULL, IOSurfaceLock() will store the buffer's
|
||||
internal modification seed value at the time you made the lock call. You can compare
|
||||
this value to a value returned previously to determine of the contents of the buffer
|
||||
has been changed since the last lock.
|
||||
|
||||
In the case of IOSurfaceUnlock(), the seed value returned will be the internal
|
||||
seed value at the time of the unlock. If you locked the buffer for writing, this value
|
||||
will be incremented as the unlock is performed and the new value will be returned.
|
||||
|
||||
See the IOSurfacePropertyKeyLock enums for more information.
|
||||
|
||||
Note: Locking and unlocking a IOSurface is not a particularly cheap operation,
|
||||
so care should be taken to avoid the calls whenever possible. The seed values are
|
||||
particularly useful for keeping a cache of the buffer contents.
|
||||
*/
|
||||
- (kern_return_t)lockWithOptions:(IOSurfaceLockOptions)options seed:(nullable uint32_t *)seed;
|
||||
- (kern_return_t)unlockWithOptions:(IOSurfaceLockOptions)options seed:(nullable uint32_t *)seed;
|
||||
|
||||
/* The total allocation size of the IOSurface */
|
||||
@property (readonly) NSInteger allocationSize;
|
||||
/* Basic surface layout information */
|
||||
@property (readonly) NSInteger width;
|
||||
@property (readonly) NSInteger height;
|
||||
@property (readonly) void *baseAddress NS_RETURNS_INNER_POINTER;
|
||||
@property (readonly) OSType pixelFormat;
|
||||
/* Note: These properties may not return well-defined values for planar surfaces */
|
||||
@property (readonly) NSInteger bytesPerRow;
|
||||
@property (readonly) NSInteger bytesPerElement;
|
||||
@property (readonly) NSInteger elementWidth;
|
||||
@property (readonly) NSInteger elementHeight;
|
||||
|
||||
/* This will return the current seed value of the buffer and is a cheap property to read to see
|
||||
if the contents of the buffer have changed since the last lock/unlock. */
|
||||
@property (readonly) uint32_t seed;
|
||||
|
||||
/* Return the number of planes in this buffer. Will be 0 if the surface is non-planar */
|
||||
@property (readonly) NSUInteger planeCount;
|
||||
|
||||
/* These properties return information about a particular plane of a IOSurface. They will
|
||||
raise if called on non-planar surfaces or if the index value is not less than the number
|
||||
of planes. */
|
||||
- (NSInteger)widthOfPlaneAtIndex:(NSUInteger)planeIndex;
|
||||
- (NSInteger)heightOfPlaneAtIndex:(NSUInteger)planeIndex;
|
||||
- (NSInteger)bytesPerRowOfPlaneAtIndex:(NSUInteger)planeIndex;
|
||||
- (NSInteger)bytesPerElementOfPlaneAtIndex:(NSUInteger)planeIndex;
|
||||
- (NSInteger)elementWidthOfPlaneAtIndex:(NSUInteger)planeIndex;
|
||||
- (NSInteger)elementHeightOfPlaneAtIndex:(NSUInteger)planeIndex;
|
||||
- (void *)baseAddressOfPlaneAtIndex:(NSUInteger)planeIndex NS_RETURNS_INNER_POINTER;
|
||||
|
||||
/* These calls let you attach property list types to a IOSurface buffer. These calls are
|
||||
expensive (they essentially must serialize the data into the kernel) and thus should be avoided whenever
|
||||
possible. Note: These functions can not be used to change the underlying surface properties. */
|
||||
- (void)setAttachment:(id)anObject forKey:(NSString *)key;
|
||||
- (nullable id)attachmentForKey:(NSString *)key;
|
||||
- (void)removeAttachmentForKey:(NSString *)key;
|
||||
- (void)setAllAttachments:(NSDictionary<NSString *, id> *)dict;
|
||||
- (nullable NSDictionary<NSString *, id> *)allAttachments;
|
||||
- (void)removeAllAttachments;
|
||||
|
||||
/* There are cases where it is useful to know whether or not an IOSurface buffer is considered to be "in use"
|
||||
by other users of the same IOSurface. In particular, CoreVideo and other APIs make use of the IOSurface
|
||||
use count facility to know when it is safe to recycle an IOSurface backed CVPixelBuffer object. This is
|
||||
particularly important when IOSurface objects are being shared across process boundaries and the normal
|
||||
mechanisms one might use would not be viable.
|
||||
|
||||
The IOSurface use count is similar in concept to any other reference counting scheme. When the global use
|
||||
count of an IOSurface goes to zero, it is no longer considered "in use". When it is anything other than
|
||||
zero, then the IOSurface is still "in use" by someone and therefore anyone attempting to maintain a pool
|
||||
of IOSurfaces to be recycled should not reclaim that IOSurface.
|
||||
|
||||
Note that IOSurface maintains both a per-process and an internal system wide usage count. In the current
|
||||
implementation, when the per-process usage count goes from zero to one, the system wide usage count is
|
||||
incremented by one. When the per-process usage count drops back to zero (either via explicit decrement
|
||||
calls or the process terminates), the global usage count is decremented by one. */
|
||||
|
||||
@property (readonly, getter = isInUse) BOOL inUse;
|
||||
- (void)incrementUseCount;
|
||||
- (void)decrementUseCount;
|
||||
|
||||
/* The localUseCount property returns the local per-process usage count for an IOSurface. This call is only
|
||||
provided for logging/debugging purposes and should never be used to determine whether an IOSurface is
|
||||
considered to be "in use". The isInUse property is the only call that should be used for that purpose. */
|
||||
@property (readonly ) int32_t localUseCount;
|
||||
|
||||
/* This property returns YES if it is legal to choose an OpenGL or Metal pixel format with a bytes per pixel
|
||||
value that is different than the bytesPerElement value(s) of this IOSurface. Returns NO if the bytes per pixel
|
||||
value must be an exact match. */
|
||||
@property (readonly) BOOL allowsPixelSizeCasting;
|
||||
|
||||
/* See comments in IOSurfaceAPI.h */
|
||||
- (kern_return_t)setPurgeable:(IOSurfacePurgeabilityState)newState oldState:(IOSurfacePurgeabilityState * __nullable)oldState
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
@end
|
||||
|
||||
// This key was misnamed.
|
||||
extern IOSurfacePropertyKey IOSurfacePropertyAllocSizeKey
|
||||
API_DEPRECATED_WITH_REPLACEMENT("IOSurfacePropertyKeyAllocSize",macos(10.12,10.14),ios(11.0,12.0),watchos(4.0,5.0),tvos(11.0,12.0));
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,447 @@
|
||||
/*
|
||||
* IOSurfaceRef.h
|
||||
* IOSurface
|
||||
*
|
||||
* Copyright 2006-2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IOSURFACE_REF_H
|
||||
#define IOSURFACE_REF_H 1
|
||||
|
||||
#include <IOSurface/IOSurfaceBase.h>
|
||||
#include <IOSurface/IOSurfaceTypes.h>
|
||||
|
||||
typedef struct CF_BRIDGED_TYPE(id) CF_BRIDGED_MUTABLE_TYPE(IOSurface) __IOSurface *IOSurfaceRef IOSFC_SWIFT_NAME(IOSurfaceRef);
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
CF_IMPLICIT_BRIDGING_ENABLED
|
||||
CF_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/* The following list of properties are used with the CFDictionary passed to IOSurfaceCreate(). */
|
||||
|
||||
/* kIOSurfaceAllocSize - CFNumber of the total allocation size of the buffer including all planes.
|
||||
Defaults to BufferHeight * BytesPerRow if not specified. Must be specified for
|
||||
dimensionless buffers. */
|
||||
extern const CFStringRef kIOSurfaceAllocSize API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceWidth - CFNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
|
||||
extern const CFStringRef kIOSurfaceWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceHeight - CFNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. */
|
||||
extern const CFStringRef kIOSurfaceHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceBytesPerRow - CFNumber for the bytes per row of the buffer. If not specified, IOSurface will first calculate
|
||||
the number full elements required on each row (by rounding up), multiplied by the bytes per element
|
||||
for this buffer. That value will then be appropriately aligned. */
|
||||
extern const CFStringRef kIOSurfaceBytesPerRow API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Optional properties for non-planar two dimensional images */
|
||||
|
||||
/* kIOSurfaceBytesPerElement - CFNumber for the total number of bytes in an element. Default to 1. */
|
||||
extern const CFStringRef kIOSurfaceBytesPerElement API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceElementWidth - CFNumber for how many pixels wide each element is. Defaults to 1. */
|
||||
extern const CFStringRef kIOSurfaceElementWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceElementHeight - CFNumber for how many pixels high each element is. Defaults to 1. */
|
||||
extern const CFStringRef kIOSurfaceElementHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceOffset - CFNumber for the starting offset into the buffer. Defaults to 0. */
|
||||
extern const CFStringRef kIOSurfaceOffset API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Properties for planar surface buffers */
|
||||
|
||||
/* kIOSurfacePlaneInfo - CFArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. */
|
||||
extern const CFStringRef kIOSurfacePlaneInfo API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneWidth - CFNumber for the width of this plane in pixels. Required for image planes. */
|
||||
extern const CFStringRef kIOSurfacePlaneWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneHeight - CFNumber for the height of this plane in pixels. Required for image planes. */
|
||||
extern const CFStringRef kIOSurfacePlaneHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneBytesPerRow - CFNumber for the bytes per row of this plane. If not specified, IOSurface will first calculate
|
||||
the number full elements required on each row (by rounding up), multiplied by the bytes per element
|
||||
for this plane. That value will then be appropriately aligned. */
|
||||
extern const CFStringRef kIOSurfacePlaneBytesPerRow API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneOffset - CFNumber for the offset into the buffer for this plane. If not specified then IOSurface
|
||||
will lay out each plane sequentially based on the previous plane's allocation size. */
|
||||
extern const CFStringRef kIOSurfacePlaneOffset API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneSize - CFNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. */
|
||||
extern const CFStringRef kIOSurfacePlaneSize API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Optional properties for planar surface buffers */
|
||||
|
||||
/* kIOSurfacePlaneBase - CFNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset */
|
||||
extern const CFStringRef kIOSurfacePlaneBase API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneBitsPerElement - CFNumber for the bits per element of this plane. Optional, default is 1.
|
||||
For use in cases where kIOSurfacePlaneBytesPerElement doesn't allow sufficient precision. */
|
||||
extern const CFStringRef kIOSurfacePlaneBitsPerElement API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneBytesPerElement - CFNumber for the bytes per element of this plane. Optional, default is 1. */
|
||||
extern const CFStringRef kIOSurfacePlaneBytesPerElement API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneElementWidth - CFNumber for the element width of this plane. Optional, default is 1. */
|
||||
extern const CFStringRef kIOSurfacePlaneElementWidth API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneElementHeight - CFNumber for the element height of this plane. Optional, default is 1. */
|
||||
extern const CFStringRef kIOSurfacePlaneElementHeight API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Optional properties global to the entire IOSurface */
|
||||
|
||||
/* kIOSurfaceCacheMode - CFNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. */
|
||||
extern const CFStringRef kIOSurfaceCacheMode API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfaceIsGlobal - CFBoolean If true, the IOSurface may be looked up by any task in the system by its ID. */
|
||||
extern const CFStringRef kIOSurfaceIsGlobal API_DEPRECATED("Global surfaces are insecure",macos(10.6,10.11), ios(11.0,11.0), watchos(4.0,4.0), tvos(11.0,11.0));
|
||||
|
||||
/* kIOSurfacePixelFormat - CFNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format */
|
||||
extern const CFStringRef kIOSurfacePixelFormat API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU. Default is true. */
|
||||
extern const CFStringRef kIOSurfacePixelSizeCastingAllowed API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* kIOSurfacePlaneComponentBitDepths - CFArray[CFNumber] for bit depth of each component in this plane. */
|
||||
extern const CFStringRef kIOSurfacePlaneComponentBitDepths API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* 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));
|
||||
|
||||
typedef CF_ENUM(int32_t, IOSurfaceComponentName) {
|
||||
kIOSurfaceComponentNameUnknown = 0,
|
||||
kIOSurfaceComponentNameAlpha = 1,
|
||||
kIOSurfaceComponentNameRed = 2,
|
||||
kIOSurfaceComponentNameGreen = 3,
|
||||
kIOSurfaceComponentNameBlue = 4,
|
||||
kIOSurfaceComponentNameLuma = 5,
|
||||
kIOSurfaceComponentNameChromaRed = 6,
|
||||
kIOSurfaceComponentNameChromaBlue = 7,
|
||||
};
|
||||
|
||||
/* kIOSurfacePlaneComponentNames - CFArray[CFNumber] for IOSurfaceComponentName of each component in this plane.
|
||||
For example 'BGRA' would be {4, 3, 2, 1} */
|
||||
extern const CFStringRef kIOSurfacePlaneComponentNames API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
typedef CF_ENUM(int32_t, IOSurfaceComponentType) {
|
||||
kIOSurfaceComponentTypeUnknown = 0,
|
||||
kIOSurfaceComponentTypeUnsignedInteger = 1,
|
||||
kIOSurfaceComponentTypeSignedInteger = 2,
|
||||
kIOSurfaceComponentTypeFloat = 3,
|
||||
kIOSurfaceComponentTypeSignedNormalized = 4,
|
||||
};
|
||||
|
||||
/* kIOSurfacePlaneComponentTypes - CFArray[CFNumber] for IOSurfaceComponentType of each component in this plane. */
|
||||
extern const CFStringRef kIOSurfacePlaneComponentTypes API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
typedef CF_ENUM(int32_t, IOSurfaceComponentRange) {
|
||||
kIOSurfaceComponentRangeUnknown = 0,
|
||||
kIOSurfaceComponentRangeFullRange = 1,
|
||||
kIOSurfaceComponentRangeVideoRange = 2,
|
||||
kIOSurfaceComponentRangeWideRange = 3,
|
||||
};
|
||||
|
||||
/* kIOSurfacePlaneComponentRanges - CFArray[CFNumber] for IOSurfaceComponentRange of each component in this plane. */
|
||||
extern const CFStringRef kIOSurfacePlaneComponentRanges API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
typedef CF_ENUM(int32_t, IOSurfaceSubsampling) {
|
||||
kIOSurfaceSubsamplingUnknown = 0,
|
||||
kIOSurfaceSubsamplingNone = 1, // Includes "4:4:4"
|
||||
kIOSurfaceSubsampling422 = 2, // Chroma downsampled by 2x1
|
||||
kIOSurfaceSubsampling420 = 3, // Chroma downsampled by 2x2
|
||||
kIOSurfaceSubsampling411 = 4, // Chroma downsampled by 4x1
|
||||
};
|
||||
|
||||
/* kIOSurfaceSubsampling - CFNumber(IOSurfaceSubsampling) describing the chroma subsampling. */
|
||||
extern const CFStringRef kIOSurfaceSubsampling API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
CFTypeID IOSurfaceGetTypeID(void)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Create a brand new IOSurface object */
|
||||
IOSurfaceRef _Nullable IOSurfaceCreate(CFDictionaryRef properties)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Perform an atomic lookup and retain of a IOSurface by its IOSurfaceID.
|
||||
Note: Performing multiple lookups of the same IOSurface will *NOT* return
|
||||
the same IOSurfaceRef. If you need to compare two IOSurface objects
|
||||
for equality, you must either do so by comparing their IOSurfaceIDs, or by
|
||||
using CFEqual(). */
|
||||
IOSurfaceRef _Nullable IOSurfaceLookup(IOSurfaceID csid) CF_RETURNS_RETAINED
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Retrieve the unique IOSurfaceID value for a IOSurface */
|
||||
IOSurfaceID IOSurfaceGetID(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* "Lock" or "Unlock" a IOSurface for reading or writing.
|
||||
|
||||
The term "lock" is used loosely in this context, and is simply used along with the
|
||||
"unlock" information to put a bound on CPU access to the raw IOSurface data.
|
||||
|
||||
If the seed parameter is non-NULL, IOSurfaceLock() will store the buffer's
|
||||
internal modification seed value at the time you made the lock call. You can compare
|
||||
this value to a value returned previously to determine of the contents of the buffer
|
||||
has been changed since the last lock.
|
||||
|
||||
In the case of IOSurfaceUnlock(), the seed value returned will be the internal
|
||||
seed value at the time of the unlock. If you locked the buffer for writing, this value
|
||||
will be incremented as the unlock is performed and the new value will be returned.
|
||||
|
||||
See the kIOSurfaceLock enums for more information.
|
||||
|
||||
Note: Locking and unlocking a IOSurface is not a particularly cheap operation,
|
||||
so care should be taken to avoid the calls whenever possible. The seed values are
|
||||
particularly useful for keeping a cache of the buffer contents.
|
||||
*/
|
||||
kern_return_t IOSurfaceLock(IOSurfaceRef buffer, IOSurfaceLockOptions options, uint32_t * _Nullable seed)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
kern_return_t IOSurfaceUnlock(IOSurfaceRef buffer, IOSurfaceLockOptions options, uint32_t * _Nullable seed)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* These routines are all fairly self explanatory. 0 is returned if buffer is invalid or NULL */
|
||||
size_t IOSurfaceGetAllocSize(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetWidth(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetHeight(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetBytesPerElement(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetBytesPerRow(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
void *IOSurfaceGetBaseAddress(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetElementWidth(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetElementHeight(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* This will return the current seed value of the buffer and is a cheap call to make to see
|
||||
if the contents of the buffer have changed since the last lock/unlock. */
|
||||
uint32_t IOSurfaceGetSeed(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Return the number of planes in this buffer. May be 0. Returns 0 for an invalid or NULL buffer pointer. */
|
||||
size_t IOSurfaceGetPlaneCount(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* These routines return information about a particular plane of a IOSurface.
|
||||
|
||||
If the planeIndex is greater than or equal to the plane count of the IOSurface, zero
|
||||
is returned.... with one exception. If this IOSurface has zero planes and a planeIndex
|
||||
of zero is passed in, the routines function just like the non-planar APIs. This is to allow
|
||||
higher level code to treat planar and non-planar buffers is a more uniform fashion. */
|
||||
|
||||
size_t IOSurfaceGetWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetBytesPerElementOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetBytesPerRowOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
void *IOSurfaceGetBaseAddressOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetElementWidthOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetElementHeightOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* These routines return information about a particular component of a particular plane of a IOSurface.
|
||||
For non-planar IOSurfaces, pass zero for planeIndex. */
|
||||
|
||||
size_t IOSurfaceGetNumberOfComponentsOfPlane(IOSurfaceRef buffer, size_t planeIndex)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
IOSurfaceComponentName IOSurfaceGetNameOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
IOSurfaceComponentType IOSurfaceGetTypeOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
IOSurfaceComponentRange IOSurfaceGetRangeOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetBitDepthOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
size_t IOSurfaceGetBitOffsetOfComponentOfPlane(IOSurfaceRef buffer, size_t planeIndex, size_t componentIndex)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
IOSurfaceSubsampling IOSurfaceGetSubsampling(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Common IOSurface keys for well-known IOSurface Values */
|
||||
|
||||
/* kIOSurfaceColorSpace defines the RGB (or other) color space for the data stored in the IOSurface. It
|
||||
is expected that this is a serialized CGColorSpaceRef, provided by the CoreGraphics CGColorSpaceRef
|
||||
serialization APIs (CGColorSpaceCopyPropertyList). */
|
||||
extern const CFStringRef kIOSurfaceColorSpace API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* CFData representation of the ICC Profile, generally via CGColorSpaceCopyICCData */
|
||||
extern const CFStringRef kIOSurfaceICCProfile API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* These calls let you attach CF property list types to a IOSurface buffer. These calls are
|
||||
expensive (they essentially must serialize the data into the kernel) and thus should be avoided whenever
|
||||
possible. Note: These functions can not be used to change the underlying surface properties. */
|
||||
void IOSurfaceSetValue(IOSurfaceRef buffer, CFStringRef key, CFTypeRef value)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
CFTypeRef _Nullable IOSurfaceCopyValue(IOSurfaceRef buffer, CFStringRef key)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
void IOSurfaceRemoveValue(IOSurfaceRef buffer, CFStringRef key)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Bulk setters and getters for setting, retrieving or removing the entire
|
||||
set of values at once .*/
|
||||
void IOSurfaceSetValues(IOSurfaceRef buffer, CFDictionaryRef keysAndValues)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
CFDictionaryRef _Nullable IOSurfaceCopyAllValues(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
void IOSurfaceRemoveAllValues(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* This call lets you get a mach_port_t that holds a reference to the IOSurface. This is useful
|
||||
if you need to atomically or securely pass an IOSurface to another task without making the surface global to
|
||||
the entire system. The returned port must be deallocated with mach_port_deallocate or the equivalent.
|
||||
Note: Any live mach ports created from an IOSurfaceRef implicity increase the IOSurface's global use
|
||||
count by one until the port is deleted. */
|
||||
mach_port_t IOSurfaceCreateMachPort(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* This call lets you take a mach_port_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it.
|
||||
Note: This call does NOT destroy the port. */
|
||||
IOSurfaceRef _Nullable IOSurfaceLookupFromMachPort(mach_port_t port) CF_RETURNS_RETAINED
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/*
|
||||
IOSurfaceGetPropertyMaximum() will return the maximum of a given property that is guaranteed to be
|
||||
compatible with all of the current devices (GPUs, etc.) in the system. The most important ones being:
|
||||
|
||||
kIOSurfaceBytesPerRow
|
||||
kIOSurfaceWidth
|
||||
kIOSurfaceHeight
|
||||
kIOSurfacePlaneBytesPerRow
|
||||
kIOSurfacePlaneWidth
|
||||
kIOSurfacePlaneHeight
|
||||
|
||||
For the width and height properties, the maximum values are the largest that are guaranteed to work
|
||||
for both reading and writing. In OpenGL terms this translates into the largest size that will work
|
||||
for both textures and render targets.
|
||||
|
||||
This function returns 0 for properties that have no predefined limit or where the concept of a limit
|
||||
would be considered invalid (such as kIOSurfacePixelFormat).
|
||||
|
||||
*/
|
||||
size_t IOSurfaceGetPropertyMaximum(CFStringRef property)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/*
|
||||
If a property has a particular alignment requirement, then IOSurfaceGetPropertyAlignment() will return it.
|
||||
If the property has no alignment requirement then 1 will be returned. The following properties
|
||||
should always be aligned if you choose calculate them yourself:
|
||||
|
||||
kIOSurfaceBytesPerRow
|
||||
kIOSurfaceOffset
|
||||
|
||||
kIOSurfacePlaneBase
|
||||
kIOSurfacePlaneOffset
|
||||
kIOSurfacePlaneBytesPerRow
|
||||
|
||||
*/
|
||||
size_t IOSurfaceGetPropertyAlignment(CFStringRef property)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* This is a convenience function to automatically align property values. For properties with no alignment
|
||||
requirements, the original value will be returned. */
|
||||
size_t IOSurfaceAlignProperty(CFStringRef property, size_t value)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
|
||||
/* There are cases where it is useful to know whether or not an IOSurface buffer is considered to be "in use"
|
||||
by other users of the same IOSurface. In particular, CoreVideo and other APIs make use of the IOSurface
|
||||
use count facility to know when it is safe to recycle an IOSurface backed CVPixelBuffer object. This is
|
||||
particularly important when IOSurface objects are being shared across process boundaries and the normal
|
||||
mechanisms one might use would not be viable.
|
||||
|
||||
The IOSurface use count is similar in concept to any other reference counting scheme. When the global use
|
||||
count of an IOSurface goes to zero, it is no longer considered "in use". When it is anything other than
|
||||
zero, then the IOSurface is still "in use" by someone and therefore anyone attempting to maintain a pool
|
||||
of IOSurfaces to be recycled should not reclaim that IOSurface.
|
||||
|
||||
Note that IOSurface maintains both a per-process and an internal system wide usage count. In the current
|
||||
implementation, when the per-process usage count goes from zero to one, the system wide usage count is
|
||||
incremented by one. When the per-process usage count drops back to zero (either via explicit decrement
|
||||
calls or the process terminates), the global usage count is decremented by one.
|
||||
|
||||
IOSurfaceGetUseCount() returns the local per-process usage count for an IOSurface. This call is only
|
||||
provided for logging/debugging purposes and should never be used to determine whether an IOSurface is
|
||||
considered to be "in use". IOSurfaceIsInUse() is the only call that should be used for that purpose. */
|
||||
|
||||
/* Increment the per-process usage count for an IOSurface */
|
||||
void IOSurfaceIncrementUseCount(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Decrement the per-process usage count for an IOSurface */
|
||||
void IOSurfaceDecrementUseCount(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.6), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
/* Return the per-process usage count for an IOSurface */
|
||||
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. */
|
||||
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 */
|
||||
Boolean IOSurfaceAllowsPixelSizeCasting(IOSurfaceRef buffer)
|
||||
API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
// This acts pretty much exactly like the Mach vm_purgeable object stuff does.
|
||||
// Note: Higher level OpenGL and/or Metal based purgeability APIs should not be used for
|
||||
// texture objects backed by IOSurfaces since they will essentially be ignored.
|
||||
|
||||
// You should assume that if you mark an IOSurface as Purgeable/Empty and mark it
|
||||
// NonVolatile and it comes back with the old state being Empty that any texture
|
||||
// objects bound to the IOSurface now have undefined content in them.
|
||||
//
|
||||
// If oldState is non-NULL, it will return the previous state of the IOSurface.
|
||||
//
|
||||
// kIOSurfacePurgeableNonVolatile - The IOSurface was not volatile and the contents are still valid
|
||||
// kIOSurfacePurgeableVolatile - The IOSurface was volatile, but the contents were not discarded
|
||||
// kIOSurfacePurgeableEmpty - The IOSurface was empty and the contents have been discarded.
|
||||
// kIOSurfacePurgeableKeepCurrent - Don't change the current status, just return what the state is now.
|
||||
kern_return_t IOSurfaceSetPurgeable(IOSurfaceRef buffer, uint32_t newState, uint32_t * __nullable oldState)
|
||||
API_AVAILABLE(macos(10.12), ios(11.0), watchos(4.0), tvos(11.0));
|
||||
|
||||
__END_DECLS
|
||||
|
||||
CF_ASSUME_NONNULL_END
|
||||
CF_IMPLICIT_BRIDGING_DISABLED
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* IOSurfaceTypes.h
|
||||
* IOSurface
|
||||
*
|
||||
* Copyright 2006-2017 Apple Inc. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IOSURFACE_TYPES_H
|
||||
#define IOSURFACE_TYPES_H
|
||||
|
||||
#include <IOSurface/IOSurfaceBase.h>
|
||||
|
||||
typedef uint32_t IOSurfaceID;
|
||||
|
||||
typedef CF_OPTIONS(uint32_t, IOSurfaceLockOptions)
|
||||
{
|
||||
// If you are not going to modify the data while you hold the lock, you should set this flag to avoid invalidating
|
||||
// any existing caches of the buffer contents. This flag should be passed both to the lock and unlock functions.
|
||||
// Non-symmetrical usage of this flag will result in undefined behavior.
|
||||
kIOSurfaceLockReadOnly = 0x00000001,
|
||||
|
||||
// If you want to detect/avoid a potentially expensive paging operation (such as readback from a GPU to system memory)
|
||||
// when you lock the buffer, you may include this flag. If locking the buffer requires a readback, the lock will
|
||||
// fail with an error return of kIOReturnCannotLock.
|
||||
kIOSurfaceLockAvoidSync = 0x00000002,
|
||||
};
|
||||
|
||||
typedef CF_OPTIONS(uint32_t, IOSurfacePurgeabilityState)
|
||||
{
|
||||
kIOSurfacePurgeableNonVolatile = 0, // Mark the IOSurface as non-volatile
|
||||
kIOSurfacePurgeableVolatile = 1, // Mark the IOSurface as volatile (contents may be thrown away)
|
||||
kIOSurfacePurgeableEmpty = 2, // Throw away the contents of the IOSurface immediately
|
||||
kIOSurfacePurgeableKeepCurrent = 3, // Keep the current setting (useful for returning current status info)
|
||||
};
|
||||
|
||||
/*
|
||||
** Note: Write-combined memory is optimized for resources that the CPU writes into, but never reads.
|
||||
** On some implementations, writes may bypass caches, which avoids cache pollution. Read actions may perform very poorly.
|
||||
** Applications should investigate changing the cache mode only if writing to normally cached buffers is known to cause
|
||||
** performance issues due to cache pollution, as write-combined memory can have surprising performance pitfalls.
|
||||
*/
|
||||
enum {
|
||||
kIOSurfaceDefaultCache = 0,
|
||||
kIOSurfaceInhibitCache = 1,
|
||||
kIOSurfaceWriteThruCache = 2,
|
||||
kIOSurfaceCopybackCache = 3,
|
||||
kIOSurfaceWriteCombineCache = 4,
|
||||
kIOSurfaceCopybackInnerCache = 5
|
||||
};
|
||||
|
||||
// IOSurface Memory mapping options (used with kIOSurfaceCacheMode or IOSurfacePropertyKeyCacheMode)
|
||||
enum {
|
||||
kIOSurfaceMapCacheShift = 8,
|
||||
kIOSurfaceMapDefaultCache = kIOSurfaceDefaultCache << kIOSurfaceMapCacheShift,
|
||||
kIOSurfaceMapInhibitCache = kIOSurfaceInhibitCache << kIOSurfaceMapCacheShift,
|
||||
kIOSurfaceMapWriteThruCache = kIOSurfaceWriteThruCache << kIOSurfaceMapCacheShift,
|
||||
kIOSurfaceMapCopybackCache = kIOSurfaceCopybackCache << kIOSurfaceMapCacheShift,
|
||||
kIOSurfaceMapWriteCombineCache = kIOSurfaceWriteCombineCache << kIOSurfaceMapCacheShift,
|
||||
kIOSurfaceMapCopybackInnerCache = kIOSurfaceCopybackInnerCache << kIOSurfaceMapCacheShift,
|
||||
};
|
||||
|
||||
/* IOSurface APIs that return a kern_return_t will return either kIOSurfaceSuccess or an internal error code for failures */
|
||||
#define kIOSurfaceSuccess KERN_SUCCESS // OK
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,161 @@
|
||||
--- !tapi-tbd
|
||||
tbd-version: 4
|
||||
targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, arm64-maccatalyst,
|
||||
arm64e-macos, arm64e-maccatalyst ]
|
||||
uuids:
|
||||
- target: x86_64-macos
|
||||
value: B84E21C0-6ECD-3D5B-900B-D4A9D8E1A420
|
||||
- target: x86_64-maccatalyst
|
||||
value: B84E21C0-6ECD-3D5B-900B-D4A9D8E1A420
|
||||
- target: arm64-macos
|
||||
value: 00000000-0000-0000-0000-000000000000
|
||||
- target: arm64-maccatalyst
|
||||
value: 00000000-0000-0000-0000-000000000000
|
||||
- target: arm64e-macos
|
||||
value: A39769AB-0374-365D-8DD2-21502E2BD0C7
|
||||
- target: arm64e-maccatalyst
|
||||
value: A39769AB-0374-365D-8DD2-21502E2BD0C7
|
||||
install-name: '/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface'
|
||||
exports:
|
||||
- targets: [ x86_64-macos, arm64e-macos, x86_64-maccatalyst, arm64e-maccatalyst,
|
||||
arm64-macos, arm64-maccatalyst ]
|
||||
symbols: [ _IOSurfaceAlignProperty, _IOSurfaceAllowsPixelSizeCasting,
|
||||
_IOSurfaceBindAccel, _IOSurfaceBindAccelOnPlane, _IOSurfaceCopyAllValues,
|
||||
_IOSurfaceCopyDataValueBytes, _IOSurfaceCopyValue, _IOSurfaceCreate,
|
||||
_IOSurfaceCreateMachPort, _IOSurfaceCreateMachPortWithOptions,
|
||||
_IOSurfaceCreateWiringAssertion, _IOSurfaceCreateXPCObject,
|
||||
_IOSurfaceDecrementUseCount, _IOSurfaceFlushProcessorCaches,
|
||||
_IOSurfaceGetAddressFormatOfPlane, _IOSurfaceGetAllocSize,
|
||||
_IOSurfaceGetBaseAddress, _IOSurfaceGetBaseAddressOfCompressedTileDataRegionOfPlane,
|
||||
_IOSurfaceGetBaseAddressOfCompressedTileHeaderRegionOfPlane,
|
||||
_IOSurfaceGetBaseAddressOfPlane, _IOSurfaceGetBitDepthOfComponentOfPlane,
|
||||
_IOSurfaceGetBitOffsetOfComponentOfPlane, _IOSurfaceGetBulkAttachments,
|
||||
_IOSurfaceGetBytesPerCompressedTileHeaderOfPlane, _IOSurfaceGetBytesPerElement,
|
||||
_IOSurfaceGetBytesPerElementOfPlane, _IOSurfaceGetBytesPerRow,
|
||||
_IOSurfaceGetBytesPerRowOfCompressedTileHeaderGroupsOfPlane,
|
||||
_IOSurfaceGetBytesPerRowOfPlane, _IOSurfaceGetBytesPerRowOfTileDataOfPlane,
|
||||
_IOSurfaceGetBytesPerTileDataOfPlane, _IOSurfaceGetCacheMode,
|
||||
_IOSurfaceGetCompressedTileDataRegionMemoryUsedOfPlane, _IOSurfaceGetCompressedTileHeightOfPlane,
|
||||
_IOSurfaceGetCompressedTileWidthOfPlane, _IOSurfaceGetCompressionFootprintOfPlane,
|
||||
_IOSurfaceGetCompressionTypeOfPlane, _IOSurfaceGetDetachModeCode,
|
||||
_IOSurfaceGetElementHeight, _IOSurfaceGetElementHeightOfPlane,
|
||||
_IOSurfaceGetElementWidth, _IOSurfaceGetElementWidthOfPlane,
|
||||
_IOSurfaceGetExtendedPixelsOfPlane, _IOSurfaceGetGraphicsCommPageAddress,
|
||||
_IOSurfaceGetHTPCPredictionSelectorOfPlane, _IOSurfaceGetHTPCVerticalHeaderGroupingModeOfPlane,
|
||||
_IOSurfaceGetHeight, _IOSurfaceGetHeightInCompressedTilesOfPlane,
|
||||
_IOSurfaceGetHeightOfPlane, _IOSurfaceGetHorizontalPixelOffsetWithinCompressedTileArrayOfPlane,
|
||||
_IOSurfaceGetID, _IOSurfaceGetIndexedTimestamp, _IOSurfaceGetNameOfComponentOfPlane,
|
||||
_IOSurfaceGetNumberOfComponentsOfPlane, _IOSurfaceGetOffsetOfPlane,
|
||||
_IOSurfaceGetPixelFormat, _IOSurfaceGetPlaneCount, _IOSurfaceGetPropertyAlignment,
|
||||
_IOSurfaceGetPropertyMaximum, _IOSurfaceGetProtectionOptions,
|
||||
_IOSurfaceGetRangeOfComponentOfPlane, _IOSurfaceGetRegistryID,
|
||||
_IOSurfaceGetSeed, _IOSurfaceGetSeedOfPlane, _IOSurfaceGetSizeOfPlane,
|
||||
_IOSurfaceGetSubsampling, _IOSurfaceGetTileFormat, _IOSurfaceGetTraceID,
|
||||
_IOSurfaceGetTypeID, _IOSurfaceGetTypeOfComponentOfPlane,
|
||||
_IOSurfaceGetUseCount, _IOSurfaceGetVerticalPixelOffsetWithinCompressedTileArrayOfPlane,
|
||||
_IOSurfaceGetWidth, _IOSurfaceGetWidthInCompressedTilesOfPlane,
|
||||
_IOSurfaceGetWidthOfPlane, _IOSurfaceGetYCbCrMatrix, _IOSurfaceIncrementUseCount,
|
||||
_IOSurfaceInitDetachModeCode, _IOSurfaceIsDisplayable, _IOSurfaceIsInUse,
|
||||
_IOSurfaceIsSysMemOnly, _IOSurfaceIsTiled, _IOSurfaceLock,
|
||||
_IOSurfaceLockPlane, _IOSurfaceLog, _IOSurfaceLookup, _IOSurfaceLookupFromMachPort,
|
||||
_IOSurfaceLookupFromXPCObject, _IOSurfaceNeedsBindAccel, _IOSurfaceNeedsBindAccelOnPlane,
|
||||
_IOSurfaceNotifierCreate, _IOSurfaceNotifierGetMachPort, _IOSurfaceNotifierGetRunLoopSource,
|
||||
_IOSurfaceNotifierGetTypeID, _IOSurfaceNotifierInvalidate,
|
||||
_IOSurfaceNotifierSetDispatchQueue, _IOSurfacePrefetchPages,
|
||||
_IOSurfacePropertyAllocSizeKey, _IOSurfacePropertyKeyAllocSize,
|
||||
_IOSurfacePropertyKeyBytesPerElement, _IOSurfacePropertyKeyBytesPerRow,
|
||||
_IOSurfacePropertyKeyCacheMode, _IOSurfacePropertyKeyElementHeight,
|
||||
_IOSurfacePropertyKeyElementWidth, _IOSurfacePropertyKeyHeight,
|
||||
_IOSurfacePropertyKeyOffset, _IOSurfacePropertyKeyPixelFormat,
|
||||
_IOSurfacePropertyKeyPixelSizeCastingAllowed, _IOSurfacePropertyKeyPlaneBase,
|
||||
_IOSurfacePropertyKeyPlaneBytesPerElement, _IOSurfacePropertyKeyPlaneBytesPerRow,
|
||||
_IOSurfacePropertyKeyPlaneElementHeight, _IOSurfacePropertyKeyPlaneElementWidth,
|
||||
_IOSurfacePropertyKeyPlaneHeight, _IOSurfacePropertyKeyPlaneInfo,
|
||||
_IOSurfacePropertyKeyPlaneOffset, _IOSurfacePropertyKeyPlaneSize,
|
||||
_IOSurfacePropertyKeyPlaneWidth, _IOSurfacePropertyKeyProtectionOptions,
|
||||
_IOSurfacePropertyKeyWidth, _IOSurfaceRemoteServerOptionDebugLogBlock,
|
||||
_IOSurfaceRemoteServerOptionDebugLogQueue, _IOSurfaceRemoveAllValues,
|
||||
_IOSurfaceRemoveValue, _IOSurfaceSetBulkAttachments, _IOSurfaceSetBulkAttachments2,
|
||||
_IOSurfaceSetCompressedTileDataRegionMemoryUsedOfPlane, _IOSurfaceSetDetachModeCode,
|
||||
_IOSurfaceSetIndexedTimestamp, _IOSurfaceSetOwnership, _IOSurfaceSetOwnershipIdentity,
|
||||
_IOSurfaceSetPurgeable, _IOSurfaceSetTiled, _IOSurfaceSetTimestamp,
|
||||
_IOSurfaceSetValue, _IOSurfaceSetValues, _IOSurfaceSetYCbCrMatrix,
|
||||
_IOSurfaceSharedEventAddEventListener, _IOSurfaceSharedEventAddListener,
|
||||
_IOSurfaceSharedEventNotifyEventListener, _IOSurfaceSharedEventNotifyListener,
|
||||
_IOSurfaceSharedEventRemoveEventListener, _IOSurfaceSharedEventRemoveListener,
|
||||
_IOSurfaceSignalEvent, _IOSurfaceSupportsProtectionOptions,
|
||||
_IOSurfaceUnlock, _IOSurfaceUnlockPlane, _IOSurfaceWiringAssertionGetTypeID,
|
||||
_IOSurfaceWrapClientImage, _IOSurfaceWrapClientMemory, _kIOFenceAllowTearing,
|
||||
_kIOSurfaceAddressFormat, _kIOSurfaceAllocSize, _kIOSurfaceAllocateFromSuperbuffer,
|
||||
_kIOSurfaceBufferTileFormat, _kIOSurfaceBufferTileMode, _kIOSurfaceBytesPerElement,
|
||||
_kIOSurfaceBytesPerRow, _kIOSurfaceCacheMode, _kIOSurfaceChromaLocationBottomField,
|
||||
_kIOSurfaceChromaLocationTopField, _kIOSurfaceChromaLocation_Bottom,
|
||||
_kIOSurfaceChromaLocation_BottomLeft, _kIOSurfaceChromaLocation_Center,
|
||||
_kIOSurfaceChromaLocation_DV420, _kIOSurfaceChromaLocation_Left,
|
||||
_kIOSurfaceChromaLocation_Top, _kIOSurfaceChromaLocation_TopLeft,
|
||||
_kIOSurfaceChromaSubsampling, _kIOSurfaceChromaSubsampling_411,
|
||||
_kIOSurfaceChromaSubsampling_420, _kIOSurfaceChromaSubsampling_422,
|
||||
_kIOSurfaceClassName, _kIOSurfaceCleanAperture, _kIOSurfaceCleanApertureHeight,
|
||||
_kIOSurfaceCleanApertureHorizontalOffset, _kIOSurfaceCleanApertureVerticalOffset,
|
||||
_kIOSurfaceCleanApertureWidth, _kIOSurfaceClientAddress, _kIOSurfaceClientAddressOffset,
|
||||
_kIOSurfaceClientAddressRanges, _kIOSurfaceClientDirection,
|
||||
_kIOSurfaceColorPrimaries, _kIOSurfaceColorPrimaries_DCI_P3,
|
||||
_kIOSurfaceColorPrimaries_EBU_3213, _kIOSurfaceColorPrimaries_ITU_R_2020,
|
||||
_kIOSurfaceColorPrimaries_ITU_R_709_2, _kIOSurfaceColorPrimaries_JEDEC_P22,
|
||||
_kIOSurfaceColorPrimaries_P3_D65, _kIOSurfaceColorPrimaries_SMPTE_C,
|
||||
_kIOSurfaceColorSpace, _kIOSurfaceCoreSurfaceLegacy, _kIOSurfaceCreationProperties,
|
||||
_kIOSurfaceDecoderTimes, _kIOSurfaceDisplayDitherCbThresholds,
|
||||
_kIOSurfaceDisplayDitherCrThresholds, _kIOSurfaceDisplayDitherThresholds,
|
||||
_kIOSurfaceDisplayDitherYThresholds, _kIOSurfaceDisplayTimes,
|
||||
_kIOSurfaceEDRFactor, _kIOSurfaceElementHeight, _kIOSurfaceElementWidth,
|
||||
_kIOSurfaceEncoderTimes, _kIOSurfaceFieldCount, _kIOSurfaceFieldDetail,
|
||||
_kIOSurfaceFieldDetail_SpatialFirstLineEarly, _kIOSurfaceFieldDetail_SpatialFirstLineLate,
|
||||
_kIOSurfaceFieldDetail_TemporalBottomFirst, _kIOSurfaceFieldDetail_TemporalTopFirst,
|
||||
_kIOSurfaceGPUTimes, _kIOSurfaceGammaLevel, _kIOSurfaceHDRImageStatisticsInfoFiltered,
|
||||
_kIOSurfaceHDRImageStatisticsInfoRaw, _kIOSurfaceHDRImageStatisticsInfoTransferFunction,
|
||||
_kIOSurfaceHDRImageStatisticsInfo_Average, _kIOSurfaceHDRImageStatisticsInfo_Maximum,
|
||||
_kIOSurfaceHDRImageStatisticsInfo_Minimum, _kIOSurfaceHeight,
|
||||
_kIOSurfaceICCProfile, _kIOSurfaceIsDisplayable, _kIOSurfaceIsGlobal,
|
||||
_kIOSurfaceIsPrivate, _kIOSurfaceMapCacheAttribute, _kIOSurfaceMemoryRegion,
|
||||
_kIOSurfaceName, _kIOSurfaceNonPurgeable, _kIOSurfaceOffset,
|
||||
_kIOSurfacePixelAspectRatio, _kIOSurfacePixelAspectRatioHorizontalSpacing,
|
||||
_kIOSurfacePixelAspectRatioVerticalSpacing, _kIOSurfacePixelCastingAllowed,
|
||||
_kIOSurfacePixelFormat, _kIOSurfacePixelSizeCastingAllowed,
|
||||
_kIOSurfacePlaneBase, _kIOSurfacePlaneBitsPerElement, _kIOSurfacePlaneBytesPerCompressedTileHeader,
|
||||
_kIOSurfacePlaneBytesPerElement, _kIOSurfacePlaneBytesPerRow,
|
||||
_kIOSurfacePlaneBytesPerRowOfCompressedTileHeaderGroups, _kIOSurfacePlaneBytesPerRowOfTileData,
|
||||
_kIOSurfacePlaneBytesPerTileData, _kIOSurfacePlaneComponentBitDepths,
|
||||
_kIOSurfacePlaneComponentBitOffsets, _kIOSurfacePlaneComponentNames,
|
||||
_kIOSurfacePlaneComponentRanges, _kIOSurfacePlaneComponentTypes,
|
||||
_kIOSurfacePlaneCompressedTileDataRegionOffset, _kIOSurfacePlaneCompressedTileHeaderRegionOffset,
|
||||
_kIOSurfacePlaneCompressedTileHeight, _kIOSurfacePlaneCompressedTileWidth,
|
||||
_kIOSurfacePlaneCompressionFootprint, _kIOSurfacePlaneCompressionType,
|
||||
_kIOSurfacePlaneElementHeight, _kIOSurfacePlaneElementWidth,
|
||||
_kIOSurfacePlaneExtendedPixelsOnBottom, _kIOSurfacePlaneExtendedPixelsOnLeft,
|
||||
_kIOSurfacePlaneExtendedPixelsOnRight, _kIOSurfacePlaneExtendedPixelsOnTop,
|
||||
_kIOSurfacePlaneHTPCPredictionSelector, _kIOSurfacePlaneHTPCVerticalHeaderGroupingMode,
|
||||
_kIOSurfacePlaneHeight, _kIOSurfacePlaneHeightInCompressedTiles,
|
||||
_kIOSurfacePlaneHorizontalPixelOffsetWithinCompressedTileArray,
|
||||
_kIOSurfacePlaneInfo, _kIOSurfacePlaneOffset, _kIOSurfacePlaneSize,
|
||||
_kIOSurfacePlaneVerticalPixelOffsetWithinCompressedTileArray,
|
||||
_kIOSurfacePlaneWidth, _kIOSurfacePlaneWidthInCompressedTiles,
|
||||
_kIOSurfacePreallocPages, _kIOSurfacePrefetchPages, _kIOSurfaceProtectionOptions,
|
||||
_kIOSurfacePurgeWhenNotInUse, _kIOSurfaceRemoteServiceName,
|
||||
_kIOSurfaceScalerTimes, _kIOSurfaceSubsampling, _kIOSurfaceSuperbuffer,
|
||||
_kIOSurfaceSysMemOnly, _kIOSurfaceTimingInfo, _kIOSurfaceTouchEventTimes,
|
||||
_kIOSurfaceTransferFunction, _kIOSurfaceTransferFunction_ARIB_STD_B67_HLG,
|
||||
_kIOSurfaceTransferFunction_ITU_R_2100_HLG, _kIOSurfaceTransferFunction_ITU_R_709_2,
|
||||
_kIOSurfaceTransferFunction_Linear, _kIOSurfaceTransferFunction_SMPTE_240M_1995,
|
||||
_kIOSurfaceTransferFunction_SMPTE_ST_2084_PQ, _kIOSurfaceTransferFunction_SMPTE_ST_428_1,
|
||||
_kIOSurfaceTransferFunction_UseGamma, _kIOSurfaceTransferFunction_aYCC,
|
||||
_kIOSurfaceTransferFunction_sRGB, _kIOSurfaceType, _kIOSurfaceUseReserve,
|
||||
_kIOSurfaceWidth, _kIOSurfaceYCbCrMatrix, _kIOSurfaceYCbCrMatrix_ITU_R_601_4_String,
|
||||
_kIOSurfaceYCbCrMatrix_ITU_R_709_2_String, _kIOSurfaceYCbCrMatrix_SMPTE_240M_1995_String ]
|
||||
objc-classes: [ IOSurface, IOSurfaceDebugDescription, IOSurfaceRemoteServer,
|
||||
IOSurfaceSharedEvent, IOSurfaceSharedEventListener, IOSurfaceWiringAssertion ]
|
||||
objc-ivars: [ IOSurfaceSharedEvent._eventPort, IOSurfaceSharedEvent._globalTraceObjectID,
|
||||
IOSurfaceSharedEventListener._dispatchQueue, IOSurfaceSharedEventListener._notificationPort ]
|
||||
- targets: [ x86_64-macos, arm64e-macos, arm64-macos ]
|
||||
symbols: [ _IOSurfaceCopyGPUPolicies, _IOSurfaceCreateChildSurface, _IOSurfaceGetParentID,
|
||||
_IOSurfaceSetImageOriginAndExtents ]
|
||||
...
|
||||
@@ -0,0 +1,10 @@
|
||||
framework module IOSurface [system] {
|
||||
umbrella "Headers"
|
||||
module * { export * }
|
||||
|
||||
module ObjC {
|
||||
requires objc
|
||||
header "IOSurfaceObjC.h"
|
||||
export *
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user