D16602: [libkwineffects] Replace property name lookup with calling the virtual methods
David Edmundson <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
davidedmundson created this revision.
davidedmundson added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
davidedmundson requested review of this revision.
REVISION SUMMARY
EffectWindow proxies its properties from the client/deleted's properties.
QObject::property(char*) is a slow string search. It's a loop
not a hash lookup!
QML is different, there's a property cache.
It's fetched multiple times for every window in every paint of some
effects (such as blur).
Hotspot showed it as 5% of the standard render pass (X11) with nothing
in kwin animating.
This patch replaces the macro that does parent()->property("propertyName")
with a macro calling the relevant function directly without metaobjects.
All custom proprties on deleted have to be moved to virtual's on the toplevel.
TEST PLAN
Existing unit tests
Ran it for a bit
REPOSITORY
R108 KWin
BRANCH
davidedmundson/faster_props
REVISION DETAIL
https://phabricator.kde.org/D16602
AFFECTED FILES
abstract_client.h
autotests/test_window_paint_data.cpp
deleted.h
effects.cpp
effects.h
libkwineffects/kwineffects.cpp
libkwineffects/kwineffects.h
toplevel.cpp
toplevel.h
To: davidedmundson, #kwin
Cc: kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart