8#ifndef skgpu_graphite_TextureInfo_DEFINED
9#define skgpu_graphite_TextureInfo_DEFINED
38 , fSampleCount(dawnInfo.fSampleCount)
39 , fMipmapped(dawnInfo.fMipmapped)
41 , fDawnSpec(dawnInfo) {}
45 TextureInfo(
const MtlTextureInfo& mtlInfo)
48 , fSampleCount(mtlInfo.fSampleCount)
49 , fMipmapped(mtlInfo.fMipmapped)
51 , fMtlSpec(mtlInfo) {}
55 TextureInfo(
const VulkanTextureInfo& vkInfo)
58 , fSampleCount(vkInfo.fSampleCount)
59 , fMipmapped(vkInfo.fMipmapped)
98 bool getVulkanTextureInfo(VulkanTextureInfo*
info)
const {
107 bool isCompatible(
const TextureInfo& that)
const;
111 SkString toRPAttachmentString()
const;
116 size_t bytesPerPixel()
const;
119 friend class DawnCaps;
120 friend class DawnCommandBuffer;
121 friend class DawnComputePipeline;
122 friend class DawnGraphicsPipeline;
123 friend class DawnResourceProvider;
124 friend class DawnTexture;
125 const DawnTextureSpec& dawnTextureSpec()
const {
132 friend class MtlCaps;
133 friend class MtlGraphicsPipeline;
134 friend class MtlTexture;
135 const MtlTextureSpec& mtlTextureSpec()
const {
142 friend class VulkanCaps;
143 friend class VulkanResourceProvider;
144 friend class VulkanTexture;
146 friend class PaintParamsKey;
148 const VulkanTextureSpec& vulkanTextureSpec()
const {
157 uint32_t fSampleCount = 1;
163 DawnTextureSpec fDawnSpec;
166 MtlTextureSpec fMtlSpec;
169 VulkanTextureSpec fVkSpec;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
Mipmapped mipmapped() const
TextureInfo(const TextureInfo &)=default
bool operator!=(const TextureInfo &that) const
uint32_t numSamples() const
BackendApi backend() const
void * fEnsureUnionNonEmpty
Protected isProtected() const
bool operator==(C p1, const scoped_nsprotocol< C > &p2)
VulkanTextureInfo VulkanTextureSpecToTextureInfo(const VulkanTextureSpec &vkSpec, uint32_t sampleCount, Mipmapped mipmapped)
size_t ComputeSize(SkISize dimensions, const TextureInfo &info)
MtlTextureInfo MtlTextureSpecToTextureInfo(const MtlTextureSpec &mtlSpec, uint32_t sampleCount, Mipmapped mipmapped)
@ VK_IMAGE_CREATE_PROTECTED_BIT