23 GrVkResourceProvider::CompatibleRPHandle compatibleRenderPassHandle) {
28 VkImageView attachments[3];
30 int numAttachments = 1;
41 createInfo.
pNext =
nullptr;
65 VkFramebuffer framebuffer,
70 GrVkResourceProvider::CompatibleRPHandle compatibleRPHandle)
72 , fFramebuffer(framebuffer)
73 , fColorAttachment(
std::move(colorAttachment))
74 , fResolveAttachment(
std::move(resolveAttachment))
75 , fStencilAttachment(
std::move(stencilAttachment))
76 , fCompatibleRenderPass(
std::move(compatibleRenderPass))
77 , fCompatibleRenderPassHandle(compatibleRPHandle) {
78 SkASSERT(fCompatibleRenderPassHandle.isValid());
84 std::unique_ptr<GrVkSecondaryCommandBuffer> externalCommandBuffer)
86 , fColorAttachment(
std::move(colorAttachment))
87 , fExternalRenderPass(
std::move(renderPass))
88 , fExternalCommandBuffer(
std::move(externalCommandBuffer)) {}
90GrVkFramebuffer::~GrVkFramebuffer() {}
92void GrVkFramebuffer::freeGPUData()
const {
102 nonConstThis->releaseResources();
105void GrVkFramebuffer::releaseResources() {
106 if (fExternalCommandBuffer) {
107 fExternalCommandBuffer->releaseResources();
108 fExternalCommandBuffer.reset();
113 std::unique_ptr<GrVkSecondaryCommandBuffer> cmdBuffer) {
115 fExternalCommandBuffer = std::move(cmdBuffer);
120 return std::move(fExternalCommandBuffer);
#define GR_VK_CALL(IFACE, X)
#define GR_VK_CALL_RESULT(GPU, RESULT, X)
sk_sp< T > sk_ref_sp(T *obj)
const GrVkRenderPass * compatibleRenderPass() const
void returnExternalGrSecondaryCommandBuffer(std::unique_ptr< GrVkSecondaryCommandBuffer >)
GrVkResourceProvider::CompatibleRPHandle compatibleRenderPassHandle() const
GrVkFramebuffer(const GrVkGpu *gpu, sk_sp< GrVkImage > colorAttachment, sk_sp< const GrVkRenderPass > renderPass, std::unique_ptr< GrVkSecondaryCommandBuffer >)
GrVkImage * resolveAttachment()
GrVkImage * colorAttachment()
static sk_sp< const GrVkFramebuffer > Make(GrVkGpu *gpu, SkISize dimensions, sk_sp< const GrVkRenderPass > compatibleRenderPass, GrVkImage *colorAttachment, GrVkImage *resolveAttachment, GrVkImage *stencilAttachment, GrVkResourceProvider::CompatibleRPHandle)
VkFramebuffer framebuffer() const
std::unique_ptr< GrVkSecondaryCommandBuffer > externalCommandBuffer()
GrVkImage * stencilAttachment()
const skgpu::VulkanInterface * vkInterface() const
VkImageView imageView() const
const GrVkImageView * framebufferView() const
VkRenderPass vkRenderPass() const
constexpr int32_t width() const
constexpr int32_t height() const
const VkImageView * pAttachments
VkFramebufferCreateFlags flags
@ VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO