8#ifndef GrMtlAttachment_DEFINED
9#define GrMtlAttachment_DEFINED
14#import <Metal/Metal.h>
44 std::string_view label);
50 MTLPixelFormat
mtlFormat()
const {
return fTexture.pixelFormat; }
78 std::string_view label);
85 std::string_view label);
89 void onSetLabel()
override;
91 id<MTLTexture> fTexture;
constexpr uint32_t SkToU32(S x)
UsageFlags supportedUsages() const
GrBackendFormat backendFormat() const override
~GrMtlAttachment() override
void onAbandon() override
static sk_sp< GrMtlAttachment > MakeTexture(GrMtlGpu *gpu, SkISize dimensions, MTLPixelFormat format, uint32_t mipLevels, GrRenderable renderable, int numSamples, skgpu::Budgeted budgeted)
MTLPixelFormat mtlFormat() const
static sk_sp< GrMtlAttachment > MakeWrapped(GrMtlGpu *gpu, SkISize dimensions, id< MTLTexture >, UsageFlags attachmentUsages, GrWrapCacheable, std::string_view label)
bool framebufferOnly() const
unsigned int sampleCount() const
void onRelease() override
id< MTLTexture > mtlTexture() const
static sk_sp< GrMtlAttachment > MakeStencil(GrMtlGpu *gpu, SkISize dimensions, int sampleCnt, MTLPixelFormat format)
static sk_sp< GrMtlAttachment > MakeMSAA(GrMtlGpu *gpu, SkISize dimensions, int sampleCnt, MTLPixelFormat format)
SkISize dimensions() const
uint32_t uint32_t * format