Class

MPSUnaryImageKernel

A kernel that consumes one texture and produces one texture.

Declaration

@interface MPSUnaryImageKernel : MPSKernel

Overview

MPSUnaryImageKernel defines shared behavior for most image processing kernels (filters) such as edging modes, clipping, and tiling support for image operations that consumes a single source textures. It is not meant to be used directly, but provides API abstraction and in some cases may allow some level of polymorphic manipulation of image kernel objects.

Topics

Methods

- encodeToCommandBuffer:inPlaceTexture:fallbackCopyAllocator:

This method attempts to apply a kernel in place on a texture.

MPSCopyAllocator

A block to make a copy of a source texture for filters that can only execute out of place.

- encodeToCommandBuffer:sourceTexture:destinationTexture:

Encodes a kernel into a command buffer, out of place.

- sourceRegionForDestinationSize:

Determines the region of the source texture that will be read for an encode operation.

Properties

offset

The position of the destination clip rectangle origin relative to the source buffer.

MPSOffset

A signed coordinate with x, y, and z components.

clipRect

An optional clip rectangle to use when writing data. Only the pixels in the rectangle will be overwritten.

MPSRegion

A region of an image.

edgeMode

The edge mode to use when texture reads stray off the edge of an image.

MPSImageEdgeMode

The options used to control the edge behavior of an image filter when it reads outside the bounds of a source texture.

Relationships

Inherits From

See Also

Image Filter Base Classes

MPSBinaryImageKernel

A kernel that consumes two textures and produces one texture.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software