[effects] Make current OpenGL context per each unloaded effect
ClosedPublic

Authored by zzag on Dec 20 2018, 9:24 PM.

Details

Summary

Some effects may release the current context when they tear down, so we
have to make the current context per each unloaded effect.

BUG: 396830
FIXED-IN: 5.15.0

Test Plan

No longer able to reproduce bug 396830.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Dec 20 2018, 9:24 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 20 2018, 9:24 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Dec 20 2018, 9:24 PM

Generally makes sense. +++

Some effects may release the current context when they tear down

Out of curiosity, which? I remember searching once.

davidedmundson accepted this revision.Dec 20 2018, 10:36 PM

Oh! I bet it's PresentWindows! It has a QQuickView as a member var.

The non-threaded render loop will have the destructor immediately and that switches contexts.
I just changed my render loop to non-threaded to confirm my theory - which explains why it only affected some people.

This revision is now accepted and ready to land.Dec 20 2018, 10:36 PM
zzag added a comment.Dec 21 2018, 12:05 AM

Oh! I bet it's PresentWindows! It has a QQuickView as a member var.

Yes, it is.

This revision was automatically updated to reflect the committed changes.