[libkwineffects] Gracefully release previous window pixmap
ClosedPublic

Authored by zzag on Oct 23 2018, 6:02 PM.

Details

Summary

If the cross fade animation is cancelled, we are not gracefully
unreference the previous window pixmap.

This change addresses that issue by using RAII approach to
reference/unreference the previous window pixmap.

Test Plan

Manually. The Maximize and the Morphing Popups effect still work.

Diff Detail

Repository
R108 KWin
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 4211
Build 4229: arc lint + arc unit
zzag created this revision.Oct 23 2018, 6:02 PM
Restricted Application added a project: KWin. · View Herald TranscriptOct 23 2018, 6:02 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Oct 23 2018, 6:02 PM
zzag added a comment.Oct 23 2018, 6:06 PM

AniData constructor got quite big.

davidedmundson added inline comments.
libkwineffects/kwinanimationeffect.cpp
350

This line ends up missing.

It doesn't look to make sense, but it was added explicitly:
b92ebe02aa49c162518b0a6ebd2481d79a1d3843

zzag added inline comments.Oct 26 2018, 11:46 AM
libkwineffects/kwinanimationeffect.cpp
350

I saw that commit and review on reviewboard, but... when exactly those glitches happen?

If I maximize a translucent Konsole window, I don't see glitches.

We can add repaint in the destructor of the lock, but then we need to document why that repaint is needed.

zzag updated this revision to Diff 44253.Oct 26 2018, 2:38 PM

Add repaint back

zzag updated this revision to Diff 44285.Oct 27 2018, 9:12 AM

Rebase.

davidedmundson accepted this revision.Oct 29 2018, 9:15 AM

FWIW, I'm not adamant about keeping that repaint line, but if there's a change not mentioned in the git comment I'll at least ask about it just to make sure it's not an accident.

This revision is now accepted and ready to land.Oct 29 2018, 9:15 AM
zzag updated this revision to Diff 44425.Oct 29 2018, 11:06 AM

Rebase.

zzag updated this revision to Diff 44839.Nov 4 2018, 1:26 PM

Rebase.

This revision was automatically updated to reflect the committed changes.