Fix flickering with Qt 5.12
ClosedPublic

Authored by volkov on Jan 18 2019, 3:16 PM.

Details

Summary

Mesa requires XESetWireToEvent xlib callbacks to be called
when DRI2 is used. This is done by the GLX integration in
the Qt's xcb plugin, but Qt 5.12 initializes the GLX integration
only when required, e.g. when a window with OpenGL support is
created or when availability of OpenGL is checked.

So force initialization of the GLX integration by calling
QOpenGLContext::supportsThreadedOpenGL().

https://codereview.qt-project.org/#/c/6557/
https://bugzilla.opensuse.org/show_bug.cgi?id=1120090

Diff Detail

Repository
R108 KWin
Branch
Plasma/5.12
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7378
Build 7396: arc lint + arc unit
volkov created this revision.Jan 18 2019, 3:16 PM
Restricted Application added a project: KWin. · View Herald TranscriptJan 18 2019, 3:16 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
volkov requested review of this revision.Jan 18 2019, 3:16 PM
filipf added a subscriber: filipf.Jan 18 2019, 6:31 PM
fvogt added a subscriber: fvogt.Jan 18 2019, 7:46 PM
fvogt added a comment.Jan 18 2019, 7:49 PM

This should probably land on Plasma/5.12 as well.

volkov updated this revision to Diff 49866.Jan 19 2019, 10:33 AM

re-target to Plasma/5.12

Maybe we shouldn't rely on Qt doing that for us, but just do it ourselves.

Also relevant is of course Fredrik's comment in the Qt bug report. It looks like this issue is not yet fully understood.

volkov updated this revision to Diff 49985.Jan 21 2019, 11:38 AM

fix commit description

volkov edited the summary of this revision. (Show Details)Jan 21 2019, 11:40 AM
volkov edited the summary of this revision. (Show Details)Jan 21 2019, 11:43 AM

Also relevant is of course Fredrik's comment in the Qt bug report

Volkov has since posted some comments there which I think clarifies the state.
Looks pretty sensible.

Maybe we shouldn't rely on Qt doing that for us, but just do it ourselves.

It seems we technically could, but if we're backporting it to LTS it seems safer to use the existing path that we know worked.

Suggestion: we take this for stable branches and switch to doing it ourselves in master.

plugins/platforms/x11/standalone/glxbackend.cpp
118

Could you please extend the comment on why we do that.

volkov updated this revision to Diff 50002.Jan 21 2019, 4:58 PM

extend the comment

graesslin accepted this revision.Jan 22 2019, 5:36 PM
This revision is now accepted and ready to land.Jan 22 2019, 5:36 PM
volkov closed this revision.Jan 22 2019, 7:37 PM