Revision 9c8b9ba...

Go back to digest for 23rd March 2014

Features in KDE Base

Martin Gräßlin committed changes in [kde-workspace] /:

[kwin] Introduce a new Effect Loading mechanism

Effect loading gets split by the kind of effects KWin supports:
* Built-In Effects
* Scripted Effects
* Binary Plugin Effects

For this a new AbstractEffectLoader is added which will have several
sub-classes:
* BuiltInEffectLoader
* ScriptedEffectLoader
* PluginEffectLoader
* EffectLoader

The EffectLoader will be what the EffectsHandlerImpl is using and it just
delegates to the three other types of loaders. Thus the handler doesn't
need to care about the different kinds of effects. The loading is
supposed to be completely async and the EffectLoader emits a signal
whenever an Effect got loaded. The EffectsHandlerImpl is supposed to
connect to this signal and insert it into its own Effect management.
Unloading is not performed by the loader, but by the EffectsHandler.

There is one important change which needs to be implemented: the ordering
cannot be provided by the loader and thus needs to be added to the
Effects directly.

So far only the BuiltInEffectsLoader is implemented. It's not yet
integrated into the EffectsHandlerImpl, but a unit test is added which
tries to perform the various operations provided by the loader and the
BuiltInEffects. The test should cover all cases except the Check Default
functionality which is only used by Blur and Contrast effects. This
cannot be mocked yet as the GLPlatform doesn't allow mocking yet.

File Changes

Added 5 files
  •   kwin/effectloader.cpp
  •   kwin/effectloader.h
  •   kwin/autotests/mock_effectshandler.cpp
  •   kwin/autotests/mock_effectshandler.h
  •   kwin/autotests/test_builtin_effectloader.cpp
Modified 2 files
  •   kwin/CMakeLists.txt
  •   kwin/autotests/CMakeLists.txt
7 files changed in total