Contents

framebufferOnly

A Boolean value that determines whether the layer’s textures are used only for rendering.

Declaration

var framebufferOnly: Bool { get set }

Discussion

If the value is true (the default), the CAMetalLayer class allocates its MTLTexture objects with only the renderTarget usage flag. Core Animation can then optimize the texture for display purposes. However, you may not sample, read from, or write to those textures. To support sampling and pixel read/write operations (at a cost to performance), set this value to false.

See Also

Configuring the Layer’s Drawable Objects