From 7e96f0967046c0789328f0cfb6888e1e604de335 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Fri, 25 Jun 2021 00:46:32 +0200 Subject: [PATCH] platforms/drm: use correct size for soft rotation --- src/plugins/platforms/drm/egl_stream_backend.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/drm/egl_stream_backend.cpp b/src/plugins/platforms/drm/egl_stream_backend.cpp index e824f9870c..8c8506d028 100644 --- a/src/plugins/platforms/drm/egl_stream_backend.cpp +++ b/src/plugins/platforms/drm/egl_stream_backend.cpp @@ -300,8 +300,9 @@ bool EglStreamBackend::initRenderingContext() bool EglStreamBackend::resetOutput(Output &o, DrmOutput *drmOutput) { o.output = drmOutput; + QSize sourceSize = drmOutput->hardwareTransforms() ? drmOutput->pixelSize() : drmOutput->modeSize(); // dumb buffer used for modesetting - o.buffer = QSharedPointer::create(m_gpu, drmOutput->pixelSize()); + o.buffer = QSharedPointer::create(m_gpu, sourceSize); if (isPrimary()) { EGLAttrib streamAttribs[] = { @@ -334,8 +335,8 @@ bool EglStreamBackend::resetOutput(Output &o, DrmOutput *drmOutput) pEglStreamConsumerOutputEXT(eglDisplay(), stream, outputLayer); EGLint streamProducerAttribs[] = { - EGL_WIDTH, drmOutput->pixelSize().width(), - EGL_HEIGHT, drmOutput->pixelSize().height(), + EGL_WIDTH, sourceSize.width(), + EGL_HEIGHT, sourceSize.height(), EGL_NONE }; EGLSurface eglSurface = pEglCreateStreamProducerSurfaceKHR(eglDisplay(), config(), stream, @@ -368,8 +369,7 @@ bool EglStreamBackend::resetOutput(Output &o, DrmOutput *drmOutput) } } } else { - QSize size = drmOutput->hardwareTransforms() ? drmOutput->pixelSize() : drmOutput->modeSize(); - o.dumbSwapchain = QSharedPointer::create(m_gpu, size); + o.dumbSwapchain = QSharedPointer::create(m_gpu, sourceSize); if (o.dumbSwapchain->isEmpty()) { return false; }