[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
Branch
make-opengl-current-context-for-each-unloaded-effect
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6218
Build 6236: arc lint + arc unit
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.