Revision 3dcfaf2...

Go back to digest for 19th August 2012

Optimization in KDE Base

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

Make the Scene owned by the Compositor

The Scene has always been created and destroyed inside what is
now the split out compositor. Which means it is actually owned
by the Compositor. The static pointer has never been needed
inside KWin core. Access to the Scene is not required for the
Window Manager. The only real usage is in the EffectsHandlerImpl
and in utils.h to provide a convenient way to figure out whether
compositing is currently active (scene != NULL).

The EffectsHandlerImpl gets also created by the Compositor after
the Scene is created and gets deleted just before the Scene gets
deleted. This allows to inject the Scene into the EffectsHandlerImpl
to resolve the static access in this class.

The convenient way to access the compositing() in utils.h had
to go. To provide the same feature the Compositor provides a
hasScene() access which has the same behavior as the old method.
In order to keep the code changes small in Workspace and Toplevel
a new method compositing() is defined which properly resolves
the state. A disadvantage is that this can no longer be inlined
and consists of several method calls and pointer checks.

File Changes

Modified 14 files
  •   kwin/composite.cpp
  •   kwin/composite.h
  •   kwin/effects.cpp
  •   kwin/effects.h
  •   kwin/events.cpp
  •   kwin/paintredirector.cpp
  •   kwin/scene.cpp
  •   kwin/scene.h
  •   kwin/scene_opengl.cpp
  •   kwin/scene_opengl.h
  •   kwin/toplevel.h
  •   kwin/utils.h
  •   kwin/workspace.cpp
  •   kwin/workspace.h
14 files changed in total