8#ifndef GrAttachment_DEFINED
9#define GrAttachment_DEFINED
28 kStencilAttachment = 0x1,
29 kColorAttachment = 0x2,
79 std::string_view label,
83 , fSampleCnt(sampleCnt)
85 , fMemoryless(memoryless) {}
88 size_t onGpuMemorySize() const final;
90 void onSetLabel()
override{}
94 const char* getResourceType()
const override {
96 return "StencilAttachment";
106 bool fHasPerformedInitialClear =
false;
#define GR_MAKE_BITFIELD_CLASS_OPS(X)
bool hasPerformedInitialClear() const
skgpu::Mipmapped mipmapped() const
GrAttachment(GrGpu *gpu, SkISize dimensions, UsageFlags supportedUsages, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, std::string_view label, GrMemoryless memoryless=GrMemoryless::kNo)
static void ComputeScratchKey(const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected, GrMemoryless, skgpu::ScratchKey *key)
UsageFlags supportedUsages() const
static void ComputeSharedAttachmentUniqueKey(const GrCaps &caps, const GrBackendFormat &format, SkISize dimensions, UsageFlags requiredUsage, int sampleCnt, skgpu::Mipmapped mipmapped, GrProtected isProtected, GrMemoryless memoryless, skgpu::UniqueKey *key)
void markHasPerformedInitialClear()
GR_DECL_BITFIELD_CLASS_OPS_FRIENDS(UsageFlags)
SkISize dimensions() const
GrSurface(GrGpu *gpu, const SkISize &dimensions, skgpu::Protected isProtected, std::string_view label)
uint32_t uint32_t * format