Discussion:
D17215: Try to invalidate quad cache when shadow is changed
Vlad Zagorodniy
2018-11-28 13:57:48 UTC
Permalink
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.

REVISION SUMMARY
213239a0ea0a9c0967bb68d1eda7a8d4d6a09498 <https://phabricator.kde.org/R108:213239a0ea0a9c0967bb68d1eda7a8d4d6a09498> tried to address the case when
a wayland client gets shadow after it was mapped, but because of poor
testing from my side, another bug was introduced. If a decoration tooltip
or the user actions popup is shown, then in some cases it can be blank.

Usually, SurfaceInterface::shadowChanged proceeds SurfaceInterface::sizeChanged,
so when the shadow is installed, window quads cache is rebuilt. But
because shell client already knows the geometry of the internal client,
goemetryShapeChanged is not emitted, thus the cache is not updated.

It would be better just to invalidate the cache when the shadow is
installed, uninstalled, or updated. This reduces the number of
unnecessary invocations of Scene::Window::buildQuads and also moves the
window quads cache handling away from the shadow code.

BUG: 399490
FIXED-IN: 5.15.0

TEST PLAN
Decoration tooltips are no longer blank.

REPOSITORY
R108 KWin

BRANCH
introduce-shadowchanged-signal

REVISION DETAIL
https://phabricator.kde.org/D17215

AFFECTED FILES
scene.cpp
scene.h
shadow.cpp
toplevel.h

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-11-28 14:01:12 UTC
Permalink
zzag edited the summary of this revision.

REPOSITORY
R108 KWin

REVISION DETAIL
https://phabricator.kde.org/D17215

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-11-28 14:01:50 UTC
Permalink
zzag edited the summary of this revision.

REPOSITORY
R108 KWin

REVISION DETAIL
https://phabricator.kde.org/D17215

To: zzag, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-11-28 14:11:31 UTC
Permalink
zzag added a subscriber: graesslin.
zzag added a comment.


@graesslin May I ask your advice?

REPOSITORY
R108 KWin

REVISION DETAIL
https://phabricator.kde.org/D17215

To: zzag, #kwin
Cc: graesslin, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
David Edmundson
2018-12-05 14:32:09 UTC
Permalink
davidedmundson added a comment.


seems sensible to me ++

REPOSITORY
R108 KWin

REVISION DETAIL
https://phabricator.kde.org/D17215

To: zzag, #kwin
Cc: davidedmundson, graesslin, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
David Edmundson
2018-12-05 17:48:02 UTC
Permalink
davidedmundson accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
R108 KWin

BRANCH
introduce-shadowchanged-signal

REVISION DETAIL
https://phabricator.kde.org/D17215

To: zzag, #kwin, davidedmundson
Cc: davidedmundson, graesslin, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Vlad Zagorodniy
2018-12-05 18:05:23 UTC
Permalink
This revision was automatically updated to reflect the committed changes.
Closed by commit R108:90a26e2e8d13: Try to invalidate quad cache when shadow is changed (authored by zzag).

REPOSITORY
R108 KWin

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D17215?vs=46405&id=46910

REVISION DETAIL
https://phabricator.kde.org/D17215

AFFECTED FILES
scene.cpp
scene.h
shadow.cpp
toplevel.h

To: zzag, #kwin, davidedmundson
Cc: davidedmundson, graesslin, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
Loading...