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