Revision 884305

Go back to digest for 16th November 2008

Optimization in KDE Base

Martin Gräßlin committed changes in /trunk/KDE/kdebase/workspace/kwin/effects:

Some more optimizations to snow effect:
* move position updates of flakes to shader
* remove the for-loop which updates the flakes. This is handled in the loop for painting the flakes
* Don't test in each frame if a flake is on the screen. Precalculate the number of frames when then flake is on the screen and count the flakes.
* Set PAINT_SCREEN_TRANSFORMED
* Remove all unneeded code (like a QTime object when we already get the time in the method)

Now it takes ~ 17 % of CPU usage on my system. Seems to be the maximum of what is possible.

File Changes

Modified 3 files
  • /trunk/KDE/kdebase/workspace/kwin/effects
  •   /snow.cpp
  •   /snow.h
  •   /data/snow.vert
3 files changed in total