Commit 50b3d1d0 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Make EffectsHandler use cached active effects list in blocksDirectScanout()

When the scene checks whether any active effect blocks direct scanout,
m_activeEffects is already populated.
parent 2b9adf27
Pipeline #170131 passed with stage
in 12 minutes and 3 seconds
......@@ -1546,14 +1546,9 @@ QStringList EffectsHandlerImpl::activeEffects() const
bool EffectsHandlerImpl::blocksDirectScanout() const
for (QVector<KWin::EffectPair>::const_iterator it = loaded_effects.constBegin(),
end = loaded_effects.constEnd();
it != end; ++it) {
if (it->second->isActive() && it->second->blocksDirectScanout()) {
return true;
return false;
return std::any_of(m_activeEffects.constBegin(), m_activeEffects.constEnd(), [](const Effect *effect) {
return effect->blocksDirectScanout();
KWaylandServer::Display *EffectsHandlerImpl::waylandDisplay() const
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment