Revision ef35572...(Back to digest)
Optimization in KDE Base
Update frame animation once every 20msec to KWin
The rationale here is that kwin paints 50 frames per second, so we make
sure that the coordinates of the thumbnails are updated at least once
for every frame.
The mechanism is implemented using two timers, the frameUpdater
refreshes the coordinates from the QDeclarativeItem every 20msec. It's
started when an "animation event" (contentXChanged) arrives.
The frameController is started at the same time, but is a single shot.
It's there to stop updating the frame after 200msec, so the updating
only happens during animations.
This patch has the effect that it fills in frames in between that are
skipped because the contentXChanged signal doesn't fire often enough for
us to keep the animation updated.
I've removed the timer from the QML file, since that's now basically
redundant, and more performant in the C++ part (less signals crossing
QML -> C++). More code cleanup in here as well.
Indeed, it makes the animation feel much more smoothly, although there's
still a slight perceived lag when you start dragging.