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 textures = QVideoTextureHelper::createTextures(m_currentFrame, rhi, rub, std::move(textures));
23 m_currentSlot = textures ? currentSlot : std::optional<
int>{};
25 return textures.get();