17#if !__has_feature(objc_arc)
18#error This file must be compiled with Arc. Use -fobjc-arc flag
43 return fFormat == otherMtl->fFormat;
48 std::string toString()
const override {
49#if defined(SK_DEBUG) || GR_TEST_UTILS
64 MTLPixelFormat fFormat;
84 return data->asMtlFormat();
96 const GrMtlTextureInfo&
info()
const {
return fTexInfo; }
103 bool isProtected()
const override {
return false; }
106 return this->isSameTexture(that);
112 return fTexInfo == otherMtl->fTexInfo;
125 GrMtlTextureInfo fTexInfo;
139 const GrMtlTextureInfo& mtlInfo,
140 std::string_view label) {
156 *outInfo =
data->info();
166 const GrMtlTextureInfo&
info()
const {
return fTexInfo; }
173 bool isProtected()
const override {
return false; }
178 return fTexInfo == otherMtl->fTexInfo;
191 GrMtlTextureInfo fTexInfo;
219 *outInfo =
data->info();
static const GrMtlBackendFormatData * get_and_cast_data(const GrBackendFormat &format)
GrMTLPixelFormat GrGetMTLPixelFormatFromMtlTextureInfo(const GrMtlTextureInfo &)
int GrMtlTextureInfoSampleCount(const GrMtlTextureInfo &)
unsigned int GrMTLPixelFormat
GrColorFormatDesc GrMtlFormatDesc(MTLPixelFormat)
int GrMtlFormatStencilBits(MTLPixelFormat)
SkTextureCompressionType GrMtlFormatToCompressionType(MTLPixelFormat)
GrBackendRenderTarget::AnyRenderTargetData AnyRenderTargetData
GrBackendApi backend() const
static GrBackendRenderTarget MakeGrBackendRenderTarget(int width, int height, int sampleCnt, int stencilBits, GrBackendApi backend, bool framebufferOnly, const RenderTargetData &data)
static GrBackendTexture MakeGrBackendTexture(int width, int height, std::string_view label, skgpu::Mipmapped mipped, GrBackendApi backend, GrTextureType texture, const TextureData &data)
static GrBackendFormat MakeGrBackendFormat(GrTextureType textureType, GrBackendApi api, const FormatData &data)
static const GrBackendFormatData * GetBackendData(const GrBackendFormat &format)
GrBackendTexture::AnyTextureData AnyTextureData
GrBackendApi backend() const
GrMtlBackendRenderTargetData(const GrMtlTextureInfo &info)
const GrMtlTextureInfo & info() const
GrMtlBackendTextureData(const GrMtlTextureInfo &info)
const GrMtlTextureInfo & info() const
uint32_t uint32_t * format
static float max(float r, float g, float b)
SK_API bool GetMtlTextureInfo(const GrBackendRenderTarget &, GrMtlTextureInfo *)
SK_API GrBackendRenderTarget MakeMtl(int width, int height, const GrMtlTextureInfo &mtlInfo)
SK_API GrBackendTexture MakeMtl(int width, int height, skgpu::Mipmapped, const GrMtlTextureInfo &mtlInfo, std::string_view label={})
SK_API bool GetMtlTextureInfo(const GrBackendTexture &, GrMtlTextureInfo *)
uint32_t MtlFormatChannels(MTLPixelFormat mtlFormat)
const char * MtlFormatToString(MTLPixelFormat mtlFormat)
size_t MtlFormatBytesPerBlock(MTLPixelFormat mtlFormat)
std::shared_ptr< const fml::Mapping > data