D6323: Remove roundtrip to XServer from Workspace::xStackingOrderIntroduce a method Workspace::markXStackingOrderAsDirty
Martin Flöser
noreply at phabricator.kde.org
Wed Jun 21 19:19:08 UTC 2017
graesslin created this revision.
Restricted Application added a project: KWin.
Restricted Application added subscribers: kwin, plasma-devel.
REVISION SUMMARY
This method replaces the calls x_stacking_dirty = true in the code base
allowing for further refactoring of that functionality.
Remove roundtrip to XServer from Workspace::xStackingOrder
The method xStackingOrder is only used during a Compositor paint pass.
If the stacking order had changed, the method updated the stacking order
from X by performing a sync XQueryTree. With other words we had a round
trip to the X server directly in the paint pass.
This change rearchitectures this area by making better use of xcb. When
we notice that the stacking order changed and an XQueryTree is needed,
we directly send out the request. When xStackingOrder is finally called,
which normally happens a few milliseconds later, the reply is retreived.
In the worst case it still blocks, but in most cases the roundtrip is
gone.
If the stacking order changed again before accessing xStackingOrder the
running request is cancelled and a new request is issued. So whenever we
get into xStackingOrder it will have the current state.
The updating of the xStackingOrder is moved into a dedicated method and
xStackingOrder invokes it through a const_cast instead of operating on
mutable variables.
TEST PLAN
Normal system usage, no issues
REPOSITORY
R108 KWin
BRANCH
xstacking-no-roundtrip
REVISION DETAIL
https://phabricator.kde.org/D6323
AFFECTED FILES
composite.cpp
events.cpp
layers.cpp
workspace.cpp
workspace.h
To: graesslin, #kwin, #plasma
Cc: plasma-devel, kwin, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170621/84635fa5/attachment-0001.html>
More information about the Plasma-devel
mailing list