@ -155,7 +155,6 @@ bool EglGbmBackend::resetOutput(Output &output)
qCCritical ( KWIN_DRM ) < < " Could not find a suitable format for output " < < output . output ;
qCCritical ( KWIN_DRM ) < < " Could not find a suitable format for output " < < output . output ;
return false ;
return false ;
}
}
output . current . format = gbmFormat . value ( ) ;
uint32_t format = gbmFormat . value ( ) . drmFormat ;
uint32_t format = gbmFormat . value ( ) . drmFormat ;
QVector < uint64_t > modifiers = output . output - > supportedModifiers ( format ) ;
QVector < uint64_t > modifiers = output . output - > supportedModifiers ( format ) ;
const QSize size = output . output - > bufferSize ( ) ;
const QSize size = output . output - > bufferSize ( ) ;
@ -193,6 +192,7 @@ bool EglGbmBackend::resetOutput(Output &output)
cleanupRenderData ( output . old ) ;
cleanupRenderData ( output . old ) ;
output . old = output . current ;
output . old = output . current ;
output . current = { } ;
output . current = { } ;
output . current . format = gbmFormat . value ( ) ;
output . current . gbmSurface = gbmSurface ;
output . current . gbmSurface = gbmSurface ;
if ( ! output . output - > needsSoftwareTransformation ( ) ) {
if ( ! output . output - > needsSoftwareTransformation ( ) ) {
@ -349,6 +349,7 @@ QSharedPointer<DrmBuffer> EglGbmBackend::importFramebuffer(Output &output, const
qCWarning ( KWIN_DRM ) < < " all imports failed on output " < < output . output ;
qCWarning ( KWIN_DRM ) < < " all imports failed on output " < < output . output ;
// try again with XRGB8888, the most universally supported basic format
// try again with XRGB8888, the most universally supported basic format
output . forceXrgb8888 = true ;
output . forceXrgb8888 = true ;
renderingBackend ( ) - > setForceXrgb8888 ( output . output ) ;
return nullptr ;
return nullptr ;
}
}
@ -862,6 +863,11 @@ bool EglGbmBackend::prefer10bpc() const
return ! ok | | preferred = = 30 ;
return ! ok | | preferred = = 30 ;
}
}
void EglGbmBackend : : setForceXrgb8888 ( DrmAbstractOutput * output ) {
auto & o = m_outputs [ output ] ;
o . forceXrgb8888 = true ;
}
bool operator = = ( const GbmFormat & lhs , const GbmFormat & rhs )
bool operator = = ( const GbmFormat & lhs , const GbmFormat & rhs )
{
{
return lhs . drmFormat = = rhs . drmFormat ;
return lhs . drmFormat = = rhs . drmFormat ;