Package apple.iosurface.c
Class IOSurface
- java.lang.Object
-
- apple.iosurface.c.IOSurface
-
public final class IOSurface extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static doubleIOSURFACE_OBJC_Hstatic doubleIOSURFACE_REF_H
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static longIOSurfaceAlignProperty(@NotNull CFStringRef property, long value)This is a convenience function to automatically align property values.static byteIOSurfaceAllowsPixelSizeCasting(@NotNull IOSurfaceRef buffer)Returns true if this IOSurface allows pixel size casting API-Since: 11.0static @Nullable CFDictionaryRefIOSurfaceCopyAllValues(@NotNull IOSurfaceRef buffer)API-Since: 11.0static @Nullable org.moe.natj.general.ptr.ConstVoidPtrIOSurfaceCopyValue(@NotNull IOSurfaceRef buffer, @NotNull CFStringRef key)API-Since: 11.0static @Nullable IOSurfaceRefIOSurfaceCreate(@NotNull CFDictionaryRef properties)Create a brand new IOSurface object API-Since: 11.0static intIOSurfaceCreateMachPort(@NotNull IOSurfaceRef buffer)This call lets you get a mach_port_t that holds a reference to the IOSurface.static voidIOSurfaceDecrementUseCount(@NotNull IOSurfaceRef buffer)Decrement the per-process usage count for an IOSurface API-Since: 11.0static longIOSurfaceGetAllocSize(@NotNull IOSurfaceRef buffer)These routines are all fairly self explanatory.static @NotNull org.moe.natj.general.ptr.VoidPtrIOSurfaceGetBaseAddress(@NotNull IOSurfaceRef buffer)API-Since: 11.0static @NotNull org.moe.natj.general.ptr.VoidPtrIOSurfaceGetBaseAddressOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0static longIOSurfaceGetBitDepthOfComponentOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0static longIOSurfaceGetBitOffsetOfComponentOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0static longIOSurfaceGetBytesPerElement(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetBytesPerElementOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0static longIOSurfaceGetBytesPerRow(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetBytesPerRowOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0static longIOSurfaceGetElementHeight(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetElementHeightOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0static longIOSurfaceGetElementWidth(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetElementWidthOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0static longIOSurfaceGetHeight(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetHeightOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0static intIOSurfaceGetID(@NotNull IOSurfaceRef buffer)Retrieve the unique IOSurfaceID value for a IOSurface API-Since: 11.0static intIOSurfaceGetNameOfComponentOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0static longIOSurfaceGetNumberOfComponentsOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)These routines return information about a particular component of a particular plane of a IOSurface.static intIOSurfaceGetPixelFormat(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetPlaneCount(@NotNull IOSurfaceRef buffer)Return the number of planes in this buffer.static longIOSurfaceGetPropertyAlignment(@NotNull CFStringRef property)If a property has a particular alignment requirement, then IOSurfaceGetPropertyAlignment() will return it.static longIOSurfaceGetPropertyMaximum(@NotNull CFStringRef property)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.static intIOSurfaceGetRangeOfComponentOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0static intIOSurfaceGetSeed(@NotNull IOSurfaceRef buffer)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.static intIOSurfaceGetSubsampling(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetTypeID()API-Since: 11.0static intIOSurfaceGetTypeOfComponentOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0static intIOSurfaceGetUseCount(@NotNull IOSurfaceRef buffer)Return the per-process usage count for an IOSurface API-Since: 11.0static longIOSurfaceGetWidth(@NotNull IOSurfaceRef buffer)API-Since: 11.0static longIOSurfaceGetWidthOfPlane(@NotNull IOSurfaceRef buffer, long planeIndex)These routines return information about a particular plane of a IOSurface.static voidIOSurfaceIncrementUseCount(@NotNull IOSurfaceRef buffer)Increment the per-process usage count for an IOSurface API-Since: 11.0static byteIOSurfaceIsInUse(@NotNull IOSurfaceRef buffer)Returns true if an IOSurface is in use by any process in the system, otherwise false.static intIOSurfaceLock(@NotNull IOSurfaceRef buffer, int options, @Nullable org.moe.natj.general.ptr.IntPtr seed)"Lock" or "Unlock" a IOSurface for reading or writing.static @Nullable IOSurfaceRefIOSurfaceLookup(int csid)Perform an atomic lookup and retain of a IOSurface by its IOSurfaceID.static @Nullable IOSurfaceRefIOSurfaceLookupFromMachPort(int port)This call lets you take a mach_port_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it.static @NotNull java.lang.StringIOSurfacePropertyAllocSizeKey()Deprecated.static @NotNull java.lang.StringIOSurfacePropertyKeyAllocSize()IOSurfacePropertyKeyAllocSize - NSNumber of the total allocation size of the buffer including all planes.static @NotNull java.lang.StringIOSurfacePropertyKeyBytesPerElement()IOSurfacePropertyKeyBytesPerElement - NSNumber for the total number of bytes in an element.static @NotNull java.lang.StringIOSurfacePropertyKeyBytesPerRow()IOSurfacePropertyKeyBytesPerRow - NSNumber for the bytes per row of the buffer.static @NotNull java.lang.StringIOSurfacePropertyKeyCacheMode()IOSurfacePropertyKeyCacheMode - NSNumber for the CPU cache mode to be used for the allocation.static @NotNull java.lang.StringIOSurfacePropertyKeyElementHeight()IOSurfacePropertyKeyElementHeight - NSNumber for how many pixels high each element is.static @NotNull java.lang.StringIOSurfacePropertyKeyElementWidth()IOSurfacePropertyKeyElementWidth - NSNumber for how many pixels wide each element is.static @NotNull java.lang.StringIOSurfacePropertyKeyHeight()IOSurfacePropertyKeyHeight - NSNumber for the height of the IOSurface buffer in pixels.static @NotNull java.lang.StringIOSurfacePropertyKeyName()IOSurfacePropertyKeyName - Provide a name for the surface at creation time.static @NotNull java.lang.StringIOSurfacePropertyKeyOffset()IOSurfacePropertyKeyOffset - NSNumber for the starting offset into the buffer.static @NotNull java.lang.StringIOSurfacePropertyKeyPixelFormat()IOSurfacePropertyKeyPixelFormat - NSNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format API-Since: 11.0static @NotNull java.lang.StringIOSurfacePropertyKeyPixelSizeCastingAllowed()IOSurfacePropertyKeyPixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneBase()IOSurfacePropertyKeyPlaneBase - NSNumber for the base offset into the buffer for this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneBytesPerElement()IOSurfacePropertyKeyPlaneBytesPerElement - NSNumber for the bytes per element of this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneBytesPerRow()IOSurfacePropertyKeyPlaneBytesPerRow - NSNumber for the bytes per row of this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneElementHeight()IOSurfacePropertyKeyPlaneElementHeight - NSNumber for the element height of this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneElementWidth()IOSurfacePropertyKeyPlaneElementWidth - NSNumber for the element width of this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneHeight()IOSurfacePropertyKeyPlaneHeight - NSNumber for the height of this plane in pixels.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneInfo()IOSurfacePropertyKeyPlaneInfo - NSArray describing each image plane in the buffer as a CFDictionary.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneOffset()IOSurfacePropertyKeyPlaneOffset - NSNumber for the offset into the buffer for this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneSize()IOSurfacePropertyKeyPlaneSize - NSNumber for the total data size of this plane.static @NotNull java.lang.StringIOSurfacePropertyKeyPlaneWidth()IOSurfacePropertyKeyPlaneWidth - NSNumber for the width of this plane in pixels.static @NotNull java.lang.StringIOSurfacePropertyKeyWidth()IOSurfacePropertyKeyWidth - NSNumber for the width of the IOSurface buffer in pixels.static voidIOSurfaceRemoveAllValues(@NotNull IOSurfaceRef buffer)API-Since: 11.0static voidIOSurfaceRemoveValue(@NotNull IOSurfaceRef buffer, @NotNull CFStringRef key)API-Since: 11.0static intIOSurfaceSetPurgeable(@NotNull IOSurfaceRef buffer, int newState, @Nullable org.moe.natj.general.ptr.IntPtr oldState)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.static voidIOSurfaceSetValue(@NotNull IOSurfaceRef buffer, @NotNull CFStringRef key, @NotNull org.moe.natj.general.ptr.ConstVoidPtr value)These calls let you attach CF property list types to a IOSurface buffer.static voidIOSurfaceSetValues(@NotNull IOSurfaceRef buffer, @NotNull CFDictionaryRef keysAndValues)Bulk setters and getters for setting, retrieving or removing the entire set of values at once .static intIOSurfaceUnlock(@NotNull IOSurfaceRef buffer, int options, @Nullable org.moe.natj.general.ptr.IntPtr seed)API-Since: 11.0static @NotNull CFStringRefkIOSurfaceAllocSize()kIOSurfaceAllocSize - CFNumber of the total allocation size of the buffer including all planes.static @NotNull CFStringRefkIOSurfaceBytesPerElement()kIOSurfaceBytesPerElement - CFNumber for the total number of bytes in an element.static @NotNull CFStringRefkIOSurfaceBytesPerRow()kIOSurfaceBytesPerRow - CFNumber for the bytes per row of the buffer.static @NotNull CFStringRefkIOSurfaceCacheMode()kIOSurfaceCacheMode - CFNumber for the CPU cache mode to be used for the allocation.static @NotNull CFStringRefkIOSurfaceColorSpace()kIOSurfaceColorSpace defines the RGB (or other) color space for the data stored in the IOSurface.static @NotNull CFStringRefkIOSurfaceElementHeight()kIOSurfaceElementHeight - CFNumber for how many pixels high each element is.static @NotNull CFStringRefkIOSurfaceElementWidth()kIOSurfaceElementWidth - CFNumber for how many pixels wide each element is.static @NotNull CFStringRefkIOSurfaceHeight()kIOSurfaceHeight - CFNumber for the height of the IOSurface buffer in pixels.static @NotNull CFStringRefkIOSurfaceICCProfile()CFData representation of the ICC Profile, generally via CGColorSpaceCopyICCData API-Since: 11.0static @NotNull CFStringRefkIOSurfaceIsGlobal()Deprecated.static @NotNull CFStringRefkIOSurfaceName()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.static @NotNull CFStringRefkIOSurfaceOffset()kIOSurfaceOffset - CFNumber for the starting offset into the buffer.static @NotNull CFStringRefkIOSurfacePixelFormat()kIOSurfacePixelFormat - CFNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format API-Since: 11.0static @NotNull CFStringRefkIOSurfacePixelSizeCastingAllowed()kIOSurfacePixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU.static @NotNull CFStringRefkIOSurfacePlaneBase()kIOSurfacePlaneBase - CFNumber for the base offset into the buffer for this plane.static @NotNull CFStringRefkIOSurfacePlaneBitsPerElement()kIOSurfacePlaneBitsPerElement - CFNumber for the bits per element of this plane.static @NotNull CFStringRefkIOSurfacePlaneBytesPerElement()kIOSurfacePlaneBytesPerElement - CFNumber for the bytes per element of this plane.static @NotNull CFStringRefkIOSurfacePlaneBytesPerRow()kIOSurfacePlaneBytesPerRow - CFNumber for the bytes per row of this plane.static @NotNull CFStringRefkIOSurfacePlaneComponentBitDepths()kIOSurfacePlaneComponentBitDepths - CFArray[CFNumber] for bit depth of each component in this plane.static @NotNull CFStringRefkIOSurfacePlaneComponentBitOffsets()kIOSurfacePlaneComponentBitOffsets - CFArray[CFNumber] for bit offset of each component in this plane, (low bit zero, high bit 7).static @NotNull CFStringRefkIOSurfacePlaneComponentNames()kIOSurfacePlaneComponentNames - CFArray[CFNumber] for IOSurfaceComponentName of each component in this plane.static @NotNull CFStringRefkIOSurfacePlaneComponentRanges()kIOSurfacePlaneComponentRanges - CFArray[CFNumber] for IOSurfaceComponentRange of each component in this plane.static @NotNull CFStringRefkIOSurfacePlaneComponentTypes()kIOSurfacePlaneComponentTypes - CFArray[CFNumber] for IOSurfaceComponentType of each component in this plane.static @NotNull CFStringRefkIOSurfacePlaneElementHeight()kIOSurfacePlaneElementHeight - CFNumber for the element height of this plane.static @NotNull CFStringRefkIOSurfacePlaneElementWidth()kIOSurfacePlaneElementWidth - CFNumber for the element width of this plane.static @NotNull CFStringRefkIOSurfacePlaneHeight()kIOSurfacePlaneHeight - CFNumber for the height of this plane in pixels.static @NotNull CFStringRefkIOSurfacePlaneInfo()kIOSurfacePlaneInfo - CFArray describing each image plane in the buffer as a CFDictionary.static @NotNull CFStringRefkIOSurfacePlaneOffset()kIOSurfacePlaneOffset - CFNumber for the offset into the buffer for this plane.static @NotNull CFStringRefkIOSurfacePlaneSize()kIOSurfacePlaneSize - CFNumber for the total data size of this plane.static @NotNull CFStringRefkIOSurfacePlaneWidth()kIOSurfacePlaneWidth - CFNumber for the width of this plane in pixels.static @NotNull CFStringRefkIOSurfaceSubsampling()kIOSurfaceSubsampling - CFNumber(IOSurfaceSubsampling) describing the chroma subsampling.static @NotNull CFStringRefkIOSurfaceWidth()kIOSurfaceWidth - CFNumber for the width of the IOSurface buffer in pixels.
-
-
-
Field Detail
-
IOSURFACE_REF_H
public static final double IOSURFACE_REF_H
- See Also:
- Constant Field Values
-
IOSURFACE_OBJC_H
public static final double IOSURFACE_OBJC_H
- See Also:
- Constant Field Values
-
-
Method Detail
-
IOSurfaceGetTypeID
public static long IOSurfaceGetTypeID()
API-Since: 11.0
-
IOSurfaceCreate
@Nullable public static @Nullable IOSurfaceRef IOSurfaceCreate(@NotNull @NotNull CFDictionaryRef properties)
Create a brand new IOSurface object API-Since: 11.0
-
IOSurfaceLookup
@Nullable public static @Nullable IOSurfaceRef IOSurfaceLookup(int csid)
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(). API-Since: 11.0
-
IOSurfaceGetID
public static int IOSurfaceGetID(@NotNull @NotNull IOSurfaceRef buffer)Retrieve the unique IOSurfaceID value for a IOSurface API-Since: 11.0
-
IOSurfaceLock
public static int IOSurfaceLock(@NotNull @NotNull IOSurfaceRef buffer, int options, @Nullable @Nullable org.moe.natj.general.ptr.IntPtr seed)"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. API-Since: 11.0
-
IOSurfaceUnlock
public static int IOSurfaceUnlock(@NotNull @NotNull IOSurfaceRef buffer, int options, @Nullable @Nullable org.moe.natj.general.ptr.IntPtr seed)API-Since: 11.0
-
IOSurfaceGetAllocSize
public static long IOSurfaceGetAllocSize(@NotNull @NotNull IOSurfaceRef buffer)These routines are all fairly self explanatory. 0 is returned if buffer is invalid or NULL API-Since: 11.0
-
IOSurfaceGetWidth
public static long IOSurfaceGetWidth(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetHeight
public static long IOSurfaceGetHeight(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetBytesPerElement
public static long IOSurfaceGetBytesPerElement(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetBytesPerRow
public static long IOSurfaceGetBytesPerRow(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetBaseAddress
@NotNull public static @NotNull org.moe.natj.general.ptr.VoidPtr IOSurfaceGetBaseAddress(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetElementWidth
public static long IOSurfaceGetElementWidth(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetElementHeight
public static long IOSurfaceGetElementHeight(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetPixelFormat
public static int IOSurfaceGetPixelFormat(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceGetSeed
public static int IOSurfaceGetSeed(@NotNull @NotNull IOSurfaceRef buffer)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. API-Since: 11.0
-
IOSurfaceGetPlaneCount
public static long IOSurfaceGetPlaneCount(@NotNull @NotNull IOSurfaceRef buffer)Return the number of planes in this buffer. May be 0. Returns 0 for an invalid or NULL buffer pointer. API-Since: 11.0
-
IOSurfaceGetWidthOfPlane
public static long IOSurfaceGetWidthOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)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. API-Since: 11.0
-
IOSurfaceGetHeightOfPlane
public static long IOSurfaceGetHeightOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0
-
IOSurfaceGetBytesPerElementOfPlane
public static long IOSurfaceGetBytesPerElementOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0
-
IOSurfaceGetBytesPerRowOfPlane
public static long IOSurfaceGetBytesPerRowOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0
-
IOSurfaceGetBaseAddressOfPlane
@NotNull public static @NotNull org.moe.natj.general.ptr.VoidPtr IOSurfaceGetBaseAddressOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0
-
IOSurfaceGetElementWidthOfPlane
public static long IOSurfaceGetElementWidthOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0
-
IOSurfaceGetElementHeightOfPlane
public static long IOSurfaceGetElementHeightOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)API-Since: 11.0
-
IOSurfaceGetNumberOfComponentsOfPlane
public static long IOSurfaceGetNumberOfComponentsOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex)These routines return information about a particular component of a particular plane of a IOSurface. For non-planar IOSurfaces, pass zero for planeIndex. API-Since: 11.0
-
IOSurfaceGetNameOfComponentOfPlane
public static int IOSurfaceGetNameOfComponentOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0
-
IOSurfaceGetTypeOfComponentOfPlane
public static int IOSurfaceGetTypeOfComponentOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0
-
IOSurfaceGetRangeOfComponentOfPlane
public static int IOSurfaceGetRangeOfComponentOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0
-
IOSurfaceGetBitDepthOfComponentOfPlane
public static long IOSurfaceGetBitDepthOfComponentOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0
-
IOSurfaceGetBitOffsetOfComponentOfPlane
public static long IOSurfaceGetBitOffsetOfComponentOfPlane(@NotNull @NotNull IOSurfaceRef buffer, long planeIndex, long componentIndex)API-Since: 11.0
-
IOSurfaceGetSubsampling
public static int IOSurfaceGetSubsampling(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceSetValue
public static void IOSurfaceSetValue(@NotNull @NotNull IOSurfaceRef buffer, @NotNull @NotNull CFStringRef key, @NotNull @NotNull org.moe.natj.general.ptr.ConstVoidPtr value)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. API-Since: 11.0
-
IOSurfaceCopyValue
@Nullable public static @Nullable org.moe.natj.general.ptr.ConstVoidPtr IOSurfaceCopyValue(@NotNull @NotNull IOSurfaceRef buffer, @NotNull @NotNull CFStringRef key)API-Since: 11.0
-
IOSurfaceRemoveValue
public static void IOSurfaceRemoveValue(@NotNull @NotNull IOSurfaceRef buffer, @NotNull @NotNull CFStringRef key)API-Since: 11.0
-
IOSurfaceSetValues
public static void IOSurfaceSetValues(@NotNull @NotNull IOSurfaceRef buffer, @NotNull @NotNull CFDictionaryRef keysAndValues)Bulk setters and getters for setting, retrieving or removing the entire set of values at once . API-Since: 11.0
-
IOSurfaceCopyAllValues
@Nullable public static @Nullable CFDictionaryRef IOSurfaceCopyAllValues(@NotNull @NotNull IOSurfaceRef buffer)
API-Since: 11.0
-
IOSurfaceRemoveAllValues
public static void IOSurfaceRemoveAllValues(@NotNull @NotNull IOSurfaceRef buffer)API-Since: 11.0
-
IOSurfaceCreateMachPort
public static int IOSurfaceCreateMachPort(@NotNull @NotNull IOSurfaceRef buffer)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. API-Since: 11.0
-
IOSurfaceLookupFromMachPort
@Nullable public static @Nullable IOSurfaceRef IOSurfaceLookupFromMachPort(int port)
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. API-Since: 11.0
-
IOSurfaceGetPropertyMaximum
public static long IOSurfaceGetPropertyMaximum(@NotNull @NotNull CFStringRef property)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). API-Since: 11.0
-
IOSurfaceGetPropertyAlignment
public static long IOSurfaceGetPropertyAlignment(@NotNull @NotNull CFStringRef property)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 API-Since: 11.0
-
IOSurfaceAlignProperty
public static long IOSurfaceAlignProperty(@NotNull @NotNull CFStringRef property, long value)This is a convenience function to automatically align property values. For properties with no alignment requirements, the original value will be returned. API-Since: 11.0
-
IOSurfaceIncrementUseCount
public static void IOSurfaceIncrementUseCount(@NotNull @NotNull IOSurfaceRef buffer)Increment the per-process usage count for an IOSurface API-Since: 11.0
-
IOSurfaceDecrementUseCount
public static void IOSurfaceDecrementUseCount(@NotNull @NotNull IOSurfaceRef buffer)Decrement the per-process usage count for an IOSurface API-Since: 11.0
-
IOSurfaceGetUseCount
public static int IOSurfaceGetUseCount(@NotNull @NotNull IOSurfaceRef buffer)Return the per-process usage count for an IOSurface API-Since: 11.0
-
IOSurfaceIsInUse
public static byte IOSurfaceIsInUse(@NotNull @NotNull IOSurfaceRef buffer)Returns true if an IOSurface is in use by any process in the system, otherwise false. API-Since: 11.0
-
IOSurfaceAllowsPixelSizeCasting
public static byte IOSurfaceAllowsPixelSizeCasting(@NotNull @NotNull IOSurfaceRef buffer)Returns true if this IOSurface allows pixel size casting API-Since: 11.0
-
IOSurfaceSetPurgeable
public static int IOSurfaceSetPurgeable(@NotNull @NotNull IOSurfaceRef buffer, int newState, @Nullable @Nullable org.moe.natj.general.ptr.IntPtr oldState)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. API-Since: 11.0
-
kIOSurfaceAllocSize
@NotNull public static @NotNull CFStringRef kIOSurfaceAllocSize()
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. API-Since: 11.0
-
kIOSurfaceWidth
@NotNull public static @NotNull CFStringRef kIOSurfaceWidth()
kIOSurfaceWidth - CFNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. API-Since: 11.0
-
kIOSurfaceHeight
@NotNull public static @NotNull CFStringRef kIOSurfaceHeight()
kIOSurfaceHeight - CFNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. API-Since: 11.0
-
kIOSurfaceBytesPerRow
@NotNull public static @NotNull CFStringRef kIOSurfaceBytesPerRow()
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. API-Since: 11.0
-
kIOSurfaceBytesPerElement
@NotNull public static @NotNull CFStringRef kIOSurfaceBytesPerElement()
kIOSurfaceBytesPerElement - CFNumber for the total number of bytes in an element. Default to 1. API-Since: 11.0
-
kIOSurfaceElementWidth
@NotNull public static @NotNull CFStringRef kIOSurfaceElementWidth()
kIOSurfaceElementWidth - CFNumber for how many pixels wide each element is. Defaults to 1. API-Since: 11.0
-
kIOSurfaceElementHeight
@NotNull public static @NotNull CFStringRef kIOSurfaceElementHeight()
kIOSurfaceElementHeight - CFNumber for how many pixels high each element is. Defaults to 1. API-Since: 11.0
-
kIOSurfaceOffset
@NotNull public static @NotNull CFStringRef kIOSurfaceOffset()
kIOSurfaceOffset - CFNumber for the starting offset into the buffer. Defaults to 0. API-Since: 11.0
-
kIOSurfacePlaneInfo
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneInfo()
kIOSurfacePlaneInfo - CFArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. API-Since: 11.0
-
kIOSurfacePlaneWidth
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneWidth()
kIOSurfacePlaneWidth - CFNumber for the width of this plane in pixels. Required for image planes. API-Since: 11.0
-
kIOSurfacePlaneHeight
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneHeight()
kIOSurfacePlaneHeight - CFNumber for the height of this plane in pixels. Required for image planes. API-Since: 11.0
-
kIOSurfacePlaneBytesPerRow
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneBytesPerRow()
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. API-Since: 11.0
-
kIOSurfacePlaneOffset
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneOffset()
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. API-Since: 11.0
-
kIOSurfacePlaneSize
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneSize()
kIOSurfacePlaneSize - CFNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. API-Since: 11.0
-
kIOSurfacePlaneBase
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneBase()
kIOSurfacePlaneBase - CFNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset API-Since: 11.0
-
kIOSurfacePlaneBitsPerElement
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneBitsPerElement()
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. API-Since: 11.0
-
kIOSurfacePlaneBytesPerElement
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneBytesPerElement()
kIOSurfacePlaneBytesPerElement - CFNumber for the bytes per element of this plane. Optional, default is 1. API-Since: 11.0
-
kIOSurfacePlaneElementWidth
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneElementWidth()
kIOSurfacePlaneElementWidth - CFNumber for the element width of this plane. Optional, default is 1. API-Since: 11.0
-
kIOSurfacePlaneElementHeight
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneElementHeight()
kIOSurfacePlaneElementHeight - CFNumber for the element height of this plane. Optional, default is 1. API-Since: 11.0
-
kIOSurfaceCacheMode
@NotNull public static @NotNull CFStringRef kIOSurfaceCacheMode()
kIOSurfaceCacheMode - CFNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. API-Since: 11.0
-
kIOSurfaceIsGlobal
@NotNull @Deprecated public static @NotNull CFStringRef kIOSurfaceIsGlobal()
Deprecated.kIOSurfaceIsGlobal - CFBoolean If true, the IOSurface may be looked up by any task in the system by its ID. API-Since: 11.0 Deprecated-Since: 11.0 Deprecated-Message: Global surfaces are insecure
-
kIOSurfacePixelFormat
@NotNull public static @NotNull CFStringRef kIOSurfacePixelFormat()
kIOSurfacePixelFormat - CFNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format API-Since: 11.0
-
kIOSurfacePixelSizeCastingAllowed
@NotNull public static @NotNull CFStringRef kIOSurfacePixelSizeCastingAllowed()
kIOSurfacePixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU. Default is true. API-Since: 11.0
-
kIOSurfacePlaneComponentBitDepths
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneComponentBitDepths()
kIOSurfacePlaneComponentBitDepths - CFArray[CFNumber] for bit depth of each component in this plane. API-Since: 11.0
-
kIOSurfacePlaneComponentBitOffsets
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneComponentBitOffsets()
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} API-Since: 11.0
-
kIOSurfacePlaneComponentNames
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneComponentNames()
kIOSurfacePlaneComponentNames - CFArray[CFNumber] for IOSurfaceComponentName of each component in this plane. For example 'BGRA' would be {4, 3, 2, 1} API-Since: 11.0
-
kIOSurfacePlaneComponentTypes
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneComponentTypes()
kIOSurfacePlaneComponentTypes - CFArray[CFNumber] for IOSurfaceComponentType of each component in this plane. API-Since: 11.0
-
kIOSurfacePlaneComponentRanges
@NotNull public static @NotNull CFStringRef kIOSurfacePlaneComponentRanges()
kIOSurfacePlaneComponentRanges - CFArray[CFNumber] for IOSurfaceComponentRange of each component in this plane. API-Since: 11.0
-
kIOSurfaceSubsampling
@NotNull public static @NotNull CFStringRef kIOSurfaceSubsampling()
kIOSurfaceSubsampling - CFNumber(IOSurfaceSubsampling) describing the chroma subsampling. API-Since: 11.0
-
IOSurfacePropertyAllocSizeKey
@NotNull @Deprecated public static @NotNull java.lang.String IOSurfacePropertyAllocSizeKey()
Deprecated.This key was misnamed. API-Since: 11.0 Deprecated-Since: 12.0
-
IOSurfacePropertyKeyWidth
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyWidth()
IOSurfacePropertyKeyWidth - NSNumber for the width of the IOSurface buffer in pixels. Required for planar IOSurfaces. API-Since: 11.0
-
IOSurfacePropertyKeyHeight
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyHeight()
IOSurfacePropertyKeyHeight - NSNumber for the height of the IOSurface buffer in pixels. Required for planar IOSurfaces. API-Since: 11.0
-
IOSurfacePropertyKeyBytesPerRow
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyBytesPerRow()
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. API-Since: 11.0
-
IOSurfacePropertyKeyBytesPerElement
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyBytesPerElement()
IOSurfacePropertyKeyBytesPerElement - NSNumber for the total number of bytes in an element. Default to 1. API-Since: 11.0
-
IOSurfacePropertyKeyElementWidth
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyElementWidth()
IOSurfacePropertyKeyElementWidth - NSNumber for how many pixels wide each element is. Defaults to 1. API-Since: 11.0
-
IOSurfacePropertyKeyElementHeight
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyElementHeight()
IOSurfacePropertyKeyElementHeight - NSNumber for how many pixels high each element is. Defaults to 1. API-Since: 11.0
-
IOSurfacePropertyKeyOffset
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyOffset()
IOSurfacePropertyKeyOffset - NSNumber for the starting offset into the buffer. Defaults to 0. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneInfo
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneInfo()
IOSurfacePropertyKeyPlaneInfo - NSArray describing each image plane in the buffer as a CFDictionary. The CFArray must have at least one entry. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneWidth
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneWidth()
IOSurfacePropertyKeyPlaneWidth - NSNumber for the width of this plane in pixels. Required for image planes. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneHeight
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneHeight()
IOSurfacePropertyKeyPlaneHeight - NSNumber for the height of this plane in pixels. Required for image planes. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneBytesPerRow
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneBytesPerRow()
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. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneOffset
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneOffset()
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. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneSize
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneSize()
IOSurfacePropertyKeyPlaneSize - NSNumber for the total data size of this plane. Defaults to plane height * plane bytes per row if not specified. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneBase
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneBase()
IOSurfacePropertyKeyPlaneBase - NSNumber for the base offset into the buffer for this plane. Optional, defaults to the plane offset API-Since: 11.0
-
IOSurfacePropertyKeyPlaneBytesPerElement
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneBytesPerElement()
IOSurfacePropertyKeyPlaneBytesPerElement - NSNumber for the bytes per element of this plane. Optional, default is 1. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneElementWidth
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneElementWidth()
IOSurfacePropertyKeyPlaneElementWidth - NSNumber for the element width of this plane. Optional, default is 1. API-Since: 11.0
-
IOSurfacePropertyKeyPlaneElementHeight
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPlaneElementHeight()
IOSurfacePropertyKeyPlaneElementHeight - NSNumber for the element height of this plane. Optional, default is 1. API-Since: 11.0
-
IOSurfacePropertyKeyCacheMode
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyCacheMode()
IOSurfacePropertyKeyCacheMode - NSNumber for the CPU cache mode to be used for the allocation. Default is kIOMapDefaultCache. API-Since: 11.0
-
IOSurfacePropertyKeyPixelFormat
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPixelFormat()
IOSurfacePropertyKeyPixelFormat - NSNumber A 32-bit unsigned integer that stores the traditional Mac OS X buffer format API-Since: 11.0
-
IOSurfacePropertyKeyPixelSizeCastingAllowed
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyPixelSizeCastingAllowed()
IOSurfacePropertyKeyPixelSizeCastingAllowed - If false the creator promises that there will be no pixel size casting when used on the GPU. Default is true. API-Since: 11.0
-
IOSurfacePropertyKeyAllocSize
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyAllocSize()
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. API-Since: 12.0
-
kIOSurfaceColorSpace
@NotNull public static @NotNull CFStringRef kIOSurfaceColorSpace()
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). API-Since: 11.0
-
kIOSurfaceICCProfile
@NotNull public static @NotNull CFStringRef kIOSurfaceICCProfile()
CFData representation of the ICC Profile, generally via CGColorSpaceCopyICCData API-Since: 11.0
-
kIOSurfaceName
@NotNull public static @NotNull CFStringRef kIOSurfaceName()
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. API-Since: 14.0
-
IOSurfacePropertyKeyName
@NotNull public static @NotNull java.lang.String IOSurfacePropertyKeyName()
IOSurfacePropertyKeyName - Provide a name for the surface at creation time. API-Since: 16.0
-
-