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