void GrVkGpuRTCommandBuffer::initWrapped() { CommandBufferInfo& cbInfo = fCommandBufferInfos.push_back(); SkASSERT(fCommandBufferInfos.count() == 1); fCurrentCmdInfo = 0; GrVkRenderTarget* vkRT = static_cast<GrVkRenderTarget*>(fRenderTarget); SkASSERT(vkRT->wrapsSecondaryCommandBuffer()); cbInfo.fRenderPass = vkRT->externalRenderPass(); cbInfo.fRenderPass->ref(); cbInfo.fBounds.setEmpty(); cbInfo.fCommandBuffers.push_back(vkRT->getExternalSecondaryCommandBuffer()); cbInfo.fCommandBuffers[0]->ref(); cbInfo.currentCmdBuf()->begin(fGpu, nullptr, cbInfo.fRenderPass); }
bool GrVkGpuRTCommandBuffer::wrapsSecondaryCommandBuffer() const { GrVkRenderTarget* vkRT = static_cast<GrVkRenderTarget*>(fRenderTarget); return vkRT->wrapsSecondaryCommandBuffer(); }