backends/x11: Use correct allocator when using software rendering

The drm device will be null when using software rendering.
This commit is contained in:
Vlad Zahorodnii 2024-04-11 16:36:46 +03:00
parent ab1350b6a6
commit bf4c5241a0

View file

@ -36,7 +36,7 @@ std::optional<OutputLayerBeginFrameInfo> X11WindowedQPainterPrimaryLayer::beginF
{
const QSize bufferSize = m_output->modeSize();
if (!m_swapchain || m_swapchain->size() != bufferSize) {
m_swapchain = std::make_unique<QPainterSwapchain>(m_backend->drmDevice()->allocator(), bufferSize, m_output->backend()->driFormatForDepth(m_output->depth()));
m_swapchain = std::make_unique<QPainterSwapchain>(m_backend->graphicsBufferAllocator(), bufferSize, m_output->backend()->driFormatForDepth(m_output->depth()));
}
m_current = m_swapchain->acquire();