Skip to content

Fix directScanout getting shadowed

Vlad Zahorodnii requested to merge work/zzag/direct-scanout-shadowing into master

Amends 7ab825cb.

This shadow "directScanout" variable breaks

if (!directScanout) {
    if (!m_backend->present(output, frame)) {
        m_backend->repairPresentation(output);
    }
}

which can result in present() function getting called twice with the same OutputFrame object: first, at line 359, and the second time at line 386. That, in its turn, would queue two drm commit objects with the same OutputFrame and then the behavior is undefined.

Edited by Vlad Zahorodnii

Merge request reports

Loading