17QVideoFrameTextures *QVideoFrameTexturePool::updateTextures(QRhi &rhi, QRhiResourceUpdateBatch &rub)
19 const int currentSlot = rhi.currentFrameSlot();
20 Q_ASSERT(size_t(currentSlot) < MaxSlotsCount);
22 m_texturesDirty =
false;
23 QVideoFrameTexturesUPtr &textures = m_textureSlots[currentSlot];
24 Q_ASSERT(!m_oldTextures);
25 m_oldTextures = std::move(textures);
26 textures = QVideoTextureHelper::createTextures(m_currentFrame, rhi, rub, m_oldTextures);
28 m_currentSlot = textures ? currentSlot : std::optional<
int>{};
30 return textures.get();