diff --git a/src/backends/drm/drm_egl_layer.cpp b/src/backends/drm/drm_egl_layer.cpp index ae75e18cb6..4a0b159548 100644 --- a/src/backends/drm/drm_egl_layer.cpp +++ b/src/backends/drm/drm_egl_layer.cpp @@ -93,35 +93,6 @@ std::shared_ptr EglGbmLayer::texture() const } } -static DrmPlane::Transformations invertAndConvertTransform(Output::Transform transform) -{ - DrmPlane::Transformations ret; - switch (transform) { - case Output::Transform::Normal: - case Output::Transform::Flipped: - ret = DrmPlane::Transformation::Rotate0; - break; - case Output::Transform::Rotated90: - case Output::Transform::Flipped90: - ret = DrmPlane::Transformation::Rotate270; - break; - case Output::Transform::Rotated180: - case Output::Transform::Flipped180: - ret = DrmPlane::Transformation::Rotate180; - break; - case Output::Transform::Rotated270: - case Output::Transform::Flipped270: - ret = DrmPlane::Transformation::Rotate90; - break; - } - if (transform == Output::Transform::Flipped || transform == Output::Transform::Flipped180) { - ret |= DrmPlane::Transformation::ReflectX; - } else if (transform == Output::Transform::Flipped90 || transform == Output::Transform::Flipped270) { - ret |= DrmPlane::Transformation::ReflectY; - } - return ret; -} - bool EglGbmLayer::scanout(SurfaceItem *surfaceItem) { static bool valid; @@ -135,7 +106,7 @@ bool EglGbmLayer::scanout(SurfaceItem *surfaceItem) return false; } const auto surface = item->surface(); - if (invertAndConvertTransform(surface->bufferTransform()) != m_pipeline->bufferOrientation()) { + if (m_pipeline->bufferOrientation() != DrmPlane::Transformation::Rotate0 || surface->bufferTransform() != m_pipeline->output()->transform()) { return false; } const auto buffer = qobject_cast(surface->buffer());