platforms/drm: adjust how transforms are set
Instead of using setTransformInternal directly, have DrmOutput set it in updateTransform, like with the other setters. Also use updateTransform instead of setTransformInternal in DrmBackend, so that hardware rotation can be used where possible.
This commit is contained in:
parent
1af2067f40
commit
e59f50e599
3 changed files with 3 additions and 3 deletions
|
@ -169,7 +169,6 @@ void AbstractWaylandOutput::applyChanges(const KWaylandServer::OutputChangeSetV2
|
|||
if (changeSet->transformChanged()) {
|
||||
qCDebug(KWIN_CORE) << "Server setting transform: " << (int)(changeSet->transform());
|
||||
auto transform = outputDeviceTransformToKWinTransform(changeSet->transform());
|
||||
setTransformInternal(transform);
|
||||
updateTransform(transform);
|
||||
emitModeChanged = true;
|
||||
}
|
||||
|
|
|
@ -502,7 +502,7 @@ void DrmBackend::readOutputsConfiguration()
|
|||
if (const QJsonValue scale = outputInfo["scale"]; !scale.isUndefined()) {
|
||||
(*it)->setScale(scale.toDouble(1.));
|
||||
}
|
||||
(*it)->setTransformInternal(KWinKScreenIntegration::toDrmTransform(outputInfo["rotation"].toInt()));
|
||||
(*it)->updateTransform(KWinKScreenIntegration::toDrmTransform(outputInfo["rotation"].toInt()));
|
||||
|
||||
if (const QJsonObject mode = outputInfo["mode"].toObject(); !mode.isEmpty()) {
|
||||
const QJsonObject size = mode["size"].toObject();
|
||||
|
@ -510,7 +510,7 @@ void DrmBackend::readOutputsConfiguration()
|
|||
}
|
||||
} else {
|
||||
(*it)->moveTo(pos);
|
||||
(*it)->setTransformInternal(DrmOutput::Transform::Normal);
|
||||
(*it)->updateTransform(DrmOutput::Transform::Normal);
|
||||
}
|
||||
pos.setX(pos.x() + (*it)->geometry().width());
|
||||
}
|
||||
|
|
|
@ -305,6 +305,7 @@ DrmPlane::Transformations outputToPlaneTransform(DrmOutput::Transform transform)
|
|||
|
||||
void DrmOutput::updateTransform(Transform transform)
|
||||
{
|
||||
setTransformInternal(transform);
|
||||
const auto planeTransform = outputToPlaneTransform(transform);
|
||||
if (!qEnvironmentVariableIsSet("KWIN_DRM_SW_ROTATIONS_ONLY")
|
||||
&& !m_pipeline->setTransformation(planeTransform)) {
|
||||
|
|
Loading…
Reference in a new issue