Revision af4eff1...
Go back to digest for 19th January 2014Optimization in KDE Base
Turn built-in effects into a library kwin links against
As all effects have always been compiled into the same .so file it's
questionable whether resolving the effects through a library is useful
at all. By linking against the built-in effects we gain the following
advantages:
* don't have to load/unload the KLibrary
* don't have to resolve the create, supported and enabled functions
* no version check required
* no dependency resolving (effects don't use it)
* remove the KWIN_EFFECT macros from the effects
All the effects are now registered in an effects_builtins file which
maps the name to a factory method and supported or enabled by default
methods.
During loading the effects we first check whether there is a built-in
effect by the given name and make a shortcut to create it through that.
If that's not possible the normal plugin loading is used.
Completely unscientific testing [1] showed an improvement of almost 10
msec during loading all the effects I use.
[1] QElapsedTimer around the loading code, start kwin five times, take
average.
REVIEW: 115073
File Changes
- /effects
- kwin/effect_builtins.cpp
- kwin/effect_builtins.h
- kwin/CMakeLists.txt
- kwin/effects.cpp
- kwin/effects.h
- kwin/effects/CMakeLists.txt
- kwin/effects/backgroundcontrast/contrast.cpp
- kwin/effects/blur/blur.cpp
- kwin/effects/coverswitch/coverswitch.cpp
- kwin/effects/cube/cube.cpp
- kwin/effects/dashboard/dashboard.cpp
- kwin/effects/desktopgrid/desktopgrid.cpp
- kwin/effects/diminactive/diminactive.cpp
- kwin/effects/dimscreen/dimscreen.cpp
- kwin/effects/fallapart/fallapart.cpp
- kwin/effects/flipswitch/flipswitch.cpp
- kwin/effects/glide/glide.cpp
- kwin/effects/highlightwindow/highlightwindow.cpp
- kwin/effects/invert/invert.cpp
- kwin/effects/kscreen/kscreen.cpp
- kwin/effects/logout/logout.cpp
- kwin/effects/lookingglass/lookingglass.cpp
- kwin/effects/magiclamp/magiclamp.cpp
- kwin/effects/magnifier/magnifier.cpp
- kwin/effects/minimizeanimation/minimizeanimation.cpp
- kwin/effects/mouseclick/mouseclick.cpp
- kwin/effects/mousemark/mousemark.cpp
- kwin/effects/presentwindows/presentwindows.cpp
- kwin/effects/resize/resize.cpp
- kwin/effects/screenedge/screenedgeeffect.cpp
- kwin/effects/screenshot/screenshot.cpp
- kwin/effects/sheet/sheet.cpp
- kwin/effects/showfps/showfps.cpp
- kwin/effects/showpaint/showpaint.cpp
- kwin/effects/slide/slide.cpp
- kwin/effects/slideback/slideback.cpp
- kwin/effects/slidingpopups/slidingpopups.cpp
- kwin/effects/snaphelper/snaphelper.cpp
- kwin/effects/startupfeedback/startupfeedback.cpp
- kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp
- kwin/effects/thumbnailaside/thumbnailaside.cpp
- kwin/effects/trackmouse/trackmouse.cpp
- kwin/effects/windowgeometry/windowgeometry.cpp
- kwin/effects/wobblywindows/wobblywindows.cpp
- kwin/effects/zoom/zoom.cpp