From 8d3c06a17845eb1dc6ef52a3f1d034f0c10eb16c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 26 Mar 2024 18:59:57 +0200 Subject: [PATCH] plugins/screencast: Simplify damage calculation in region screen cast source Whether the output is rotated should be irrelevant. The region screen cast source handles scrapping fairly well blitting from rotated outputs. --- src/plugins/screencast/regionscreencastsource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/screencast/regionscreencastsource.cpp b/src/plugins/screencast/regionscreencastsource.cpp index e5f067b116..d0afb6445e 100644 --- a/src/plugins/screencast/regionscreencastsource.cpp +++ b/src/plugins/screencast/regionscreencastsource.cpp @@ -74,7 +74,7 @@ void RegionScreenCastSource::update(Output *output, const QRegion &damage) { blit(output); - const QRegion effectiveDamage = (output->pixelSize() != output->modeSize() ? output->geometry() : damage) + const QRegion effectiveDamage = damage .translated(-m_region.topLeft()) .intersected(m_region); const QRegion nativeDamage = scaleRegion(effectiveDamage, m_scale);