Commit e7da4d65 authored by Roman Gilg's avatar Roman Gilg
Browse files

[platforms/x11/standalone] Use intel swap events by default

Summary:
Activate intel swap events by default if available. They were hidden behind an
environmental variable because of some critical release blocking issue years
ago.

Manual testing indicates that there are no issues anymore with this extension.
Since it allows us to use swap events with MESA drivers for optimized repaints
enable swap events by default again.

For now leave a modified environment variable to switch back to using no swap
events easily.

CCBUG: 342582

Test Plan: i915

Reviewers: #kwin

Subscribers: zzag, broulik, kwin

Tags: #kwin

Maniphest Tasks: T11071

Differential Revision: https://phabricator.kde.org/D25300
parent 00bf75d0
......@@ -207,9 +207,10 @@ void GlxBackend::init()
m_haveMESASwapControl = hasExtension(QByteArrayLiteral("GLX_MESA_swap_control"));
m_haveEXTSwapControl = hasExtension(QByteArrayLiteral("GLX_EXT_swap_control"));
// only enable Intel swap event if env variable is set, see BUG 342582
// Allow to disable Intel swap event with env variable. There were problems in the past.
// See BUG 342582.
if (hasExtension(QByteArrayLiteral("GLX_INTEL_swap_event")) &&
qgetenv("KWIN_USE_INTEL_SWAP_EVENT") == QByteArrayLiteral("1")) {
qgetenv("KWIN_USE_INTEL_SWAP_EVENT") != QByteArrayLiteral("0")) {
m_swapEventFilter = std::make_unique<SwapEventFilter>(window, glxWindow);
glXSelectEvent(display(), glxWindow, GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK);
}
......
Markdown is supported
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