[Kde-games-devel] KWin4 Status

Mauricio Piacentini mauricio at tabuleiro.com
Mon Feb 19 21:59:27 CET 2007


Tomasz Boczkowski wrote:
> The removement of update() causes kwin4's introductory animation not to
> run smothly and consume 60% of my processor as kwin4 process. When this
> function is called in KWin4View::updateAndAdvance() the objects move
> smoother but Xorg "eats up" 50% of my processing power. 
> 
> Is it hardware-specific problem? My laptop has Intel Pentium M 1.76Ghz
> processor and Intel 915GM graphics controller.

These are the same specs as my laptop. You will notice that I only 
changed one update(), the one that was triggering the redraw of the 
field at every tick, which is a common leftover when porting QWidget 
code to QGV. When you use QGV you should not call update() on the view, 
as this dirties the whole view rect.

If you notice the update pattern (using QT_FLUSH_PAINT) you will see 
that it looks like only the changed portions are being updated. The high 
cpu usage is something we have seen before depending on the number of 
rects collected by QGV, apparently, and it was the reason why we dropped 
it in KGoldRunner, as it was ruining the game timing depending on the 
pattern of rects that were updated at certain situations. This same 
symptom was reported by others in qt4-preview, using different 
applications. There has been changes in QGV for 4.3 that will probably 
make it for KDE4, but I am not sure at this time if they change this 
particular case.

If you are interesting in trying to diagnose and fix this issue, and the 
one in kbounce, that would be great. Have a look at the KGoldrunner 
threads in the archives (around Sept/06), and also qt4-preview. I 
personally do not feel like re-visiting QGV debugging and profiling 
right now. For KMines/KMahjongg I do not see a reason to use QGV, as the 
current solutions of using QPainter directly or KGameCanvas fit the 
needs of these games. Ian is apparently also sticking with KGameCanvas 
for now in KGoldRunner. Other games like Katomic, Kreversi and more have 
converted cleanly to QGV. Too bad Dmitry is not around these days, he is 
more experienced with QGV and can probably contribute when he comes back 
from his business trip.

Regards,
Mauricio Piacentini


More information about the kde-games-devel mailing list