9#ifndef GrVkRenderTarget_DEFINED
10#define GrVkRenderTarget_DEFINED
58 return fColorAttachment.
get();
67 return fResolveAttachment.
get();
83 return fResolveAttachment ? fResolveAttachment.
get() : fColorAttachment.
get();
128 std::string_view label);
143 std::string_view label);
152 std::pair<const GrVkRenderPass*, GrVkResourceProvider::CompatibleRPHandle>
153 createSimpleRenderPass(
bool withResolve,
157 void createFramebuffer(
bool withResolve,
162 bool completeStencilAttachment(
GrAttachment* stencil,
bool useMSAASurface)
override;
170 fResolveAttachment ? fResolveAttachment.
get() : fColorAttachment.
get();
174 void releaseInternalObjects();
184 static constexpr int kNumCachedFramebuffers = 32;
static constexpr bool SkToBool(const T &x)
SkISize dimensions() const
GrInternalSurfaceFlags flags() const
const GrVkImageView * framebufferView() const
void setResourceRelease(sk_sp< RefCntedReleaseProc > releaseHelper)
LoadFromResolve loadFromResolve() const
SelfDependencyFlags selfDependencyFlags() const
bool hasStencilAttachment() const
bool hasResolveAttachment() const
GrBackendRenderTarget getBackendRenderTarget() const override
void onSetLabel() override
bool getAttachmentsDescriptor(GrVkRenderPass::AttachmentsDescriptor *desc, GrVkRenderPass::AttachmentFlags *flags, bool withResolve, bool withStencil)
~GrVkRenderTarget() override
bool wrapsSecondaryCommandBuffer() const
size_t onGpuMemorySize() const override
GrVkImage * externalAttachment() const
sk_sp< GrVkFramebuffer > externalFramebuffer() const
GrVkImage * nonMSAAAttachment() const
bool canAttemptStencilAttachment(bool useMSAASurface) const override
const GrVkImageView * resolveAttachmentView() const
void onAbandon() override
GrVkRenderPass::LoadFromResolve LoadFromResolve
static void ReconstructAttachmentsDescriptor(const GrVkCaps &vkCaps, const GrProgramInfo &programInfo, GrVkRenderPass::AttachmentsDescriptor *desc, GrVkRenderPass::AttachmentFlags *flags)
const GrVkFramebuffer * getFramebuffer(bool withResolve, bool withStencil, SelfDependencyFlags selfDepFlags, LoadFromResolve)
GrVkImage * colorAttachment() const
const GrVkFramebuffer * getFramebuffer(const GrVkRenderPass &renderPass)
const GrVkImageView * colorAttachmentView() const
GrBackendFormat backendFormat() const override
void onRelease() override
GrVkRenderTarget(GrVkGpu *gpu, SkISize dimensions, sk_sp< GrVkImage > colorAttachment, sk_sp< GrVkImage > resolveImage, CreateType createType, std::string_view label)
GrVkRenderPass::SelfDependencyFlags SelfDependencyFlags
GrVkImage * resolveAttachment() const
GrVkResourceProvider::CompatibleRPHandle compatibleRenderPassHandle(bool withResolve, bool withStencil, SelfDependencyFlags selfDepFlags, LoadFromResolve)
static sk_sp< GrVkRenderTarget > MakeSecondaryCBRenderTarget(GrVkGpu *, SkISize, const GrVkDrawableInfo &vkInfo)
static sk_sp< GrVkRenderTarget > MakeWrappedRenderTarget(GrVkGpu *, SkISize, int sampleCnt, const GrVkImageInfo &, sk_sp< skgpu::MutableTextureState >)
const GrVkRenderPass * getSimpleRenderPass(bool withResolve, bool withStencil, SelfDependencyFlags selfDepFlags, LoadFromResolve)