platforms/drm: only allocate two dumb buffers for the swapchain
This commit is contained in:
parent
35e37f7347
commit
4ee3f69dd5
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ namespace KWin
|
|||
DumbSwapchain::DumbSwapchain(DrmGpu *gpu, const QSize &size)
|
||||
: m_size(size)
|
||||
{
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
auto buffer = QSharedPointer<DrmDumbBuffer>::create(gpu, size);
|
||||
if (!buffer->bufferId()) {
|
||||
break;
|
||||
|
@ -28,7 +28,7 @@ DumbSwapchain::DumbSwapchain(DrmGpu *gpu, const QSize &size)
|
|||
buffer->image()->fill(Qt::black);
|
||||
m_buffers << buffer;
|
||||
}
|
||||
if (m_buffers.count() < 3) {
|
||||
if (m_buffers.count() < 2) {
|
||||
qCWarning(KWIN_DRM) << "Failed to create dumb buffers for swapchain!";
|
||||
m_buffers.clear();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue