[Kde-games-devel] SVG and MainWindow resize handling

Andreas Pakulat apaku at gmx.de
Sat Jan 19 23:27:32 CET 2008


On 19.01.08 15:50:33, Luciano Montanaro wrote:
> I have added an experimental direct-top pixmap mode rendering to KGoldrunner.
> 
> On my hardware, it seems to be quite helpful with complex backgrounds 
> rendering (the Egypt theme, for example) while the rendering of the runners 
> is faster with the old method. However, the performance is probably heavily 
> dependent on how fast render acceleration is in the X11 driver.
> 
> So it would help if a few people could try running kgoldrunner with and 
> without the experimental feature and drop me an email with the results...
> 
> To do this test you have to run kgoldrunner from a terminal.
> 
> To enable the experimental code you have to set KGOLDRUNNER_USE_PIXMAPS to 1 
> before running kgoldrunner, so type:
> 
> KGOLDRUNNER_USE_PIXMAPS=1 kgoldrunner
> 
> start a level, pause it; then change the theme to something different from the 
> egypt theme, then to the egypt theme.

Here's what I've got when setting KGOLDRUNNER_USE_PIXMAPS=1, the first
part is "loading egypt, maximizing and restoring size"

,----
| kgoldrunner(10750) KGrTheme::load: New Theme - "/home/andreas/kde4/share/apps/kgoldrunner/themes/egypt.desktop"
| kgoldrunner(10750) KGrCanvas::changeTheme: 4044 msec.  Finish loading new theme.
| kgoldrunner(10750) KGrCanvas::drawTheScene: 0 msec.  Start KGrCanvas::drawTheScene
| kgoldrunner(10750) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| background took 1375 ms to render
| kgoldrunner(10750) KGrCanvas::drawTheScene: 2745 msec.  Tiles and background rendered.
| rendering frames took  2276 ms
| rendering frames took  811 ms
| rendering frames took  855 ms
| kgoldrunner(10750) KGrCanvas::drawTheScene: 3944 msec.  Hero and enemies rendered.
| kgoldrunner(10750) KGrCanvas::drawTheScene: 1 msec.  Finish KGrCanvas::drawTheScene
| kgoldrunner(10750) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 5 QSize(1680,929)
| kgoldrunner(10750) KGrCanvas::drawTheScene: 0 msec.  Start KGrCanvas::drawTheScene
| kgoldrunner(10750) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 38 x 38
| kgoldrunner(10750) renderBackground: Trying to load background "background0"
| background took 2023 ms to render
| kgoldrunner(10750) KGrCanvas::drawTheScene: 2528 msec.  Tiles and background rendered.
| rendering frames took  2283 ms
| rendering frames took  826 ms
| rendering frames took  871 ms
| kgoldrunner(10750) KGrCanvas::drawTheScene: 3982 msec.  Hero and enemies rendered.
| kgoldrunner(10750) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 6 QSize(953,702)
| kgoldrunner(10750) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10750) renderBackground: Trying to load background "background0"
| background took 1402 ms to render
| kgoldrunner(10750) KGrCanvas::drawTheScene: 1945 msec.  Tiles and background rendered.
| rendering frames took  2723 ms
| rendering frames took  921 ms
| rendering frames took  864 ms
| kgoldrunner(10750) KGrCanvas::drawTheScene: 4509 msec.  Hero and enemies rendered.
`----

And this is changing to the default theme and also maximizing and
restoring size:

,----
| kgoldrunner(10750) KGrTheme::load: New Theme - "/home/andreas/kde4/share/apps/kgoldrunner/themes/default.desktop"
| kgoldrunner(10750) KGrCanvas::changeTheme: 581 msec.  Finish loading new theme.
| kgoldrunner(10750) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10750) renderBackground: Trying to load background "background0"
| background took 2291 ms to render
| kgoldrunner(10750) KGrCanvas::drawTheScene: 2692 msec.  Tiles and background rendered.
| rendering frames took  567 ms
| rendering frames took  691 ms
| rendering frames took  650 ms
| kgoldrunner(10750) KGrCanvas::drawTheScene: 1910 msec.  Hero and enemies rendered.
| kgoldrunner(10750) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 7 QSize(1680,929)
| kgoldrunner(10750) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 38 x 38
| kgoldrunner(10750) renderBackground: Trying to load background "background0"
| background took 3996 ms to render
| kgoldrunner(10750) KGrCanvas::drawTheScene: 4153 msec.  Tiles and background rendered.
| rendering frames took  483 ms
| rendering frames took  530 ms
| rendering frames took  566 ms
| kgoldrunner(10750) KGrCanvas::drawTheScene: 1582 msec.  Hero and enemies rendered.
| kgoldrunner(10750) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 8 QSize(953,702)
| kgoldrunner(10750) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10750) renderBackground: Trying to load background "background0"
| background took 2313 ms to render
| kgoldrunner(10750) KGrCanvas::drawTheScene: 2412 msec.  Tiles and background rendered.
| rendering frames took  485 ms
| rendering frames took  538 ms
| rendering frames took  572 ms
| kgoldrunner(10750) KGrCanvas::drawTheScene: 1598 msec.  Hero and enemies rendered.
| kgoldrunner(10750) KGrCanvas::drawTheScene: 0 msec.  Finish KGrCanvas::drawTheScene
`----

This is the complete log with KGOLDRUNNER_USE_PIXMAPS=0, doing: start of
KGR, maximize, restor, load egypt, maximize, restor, load default,
maximize restore.

,----
| andreas at morpheus:~/KDE-work/4.0/kdegames/kpat>export KGOLDRUNNER_USE_PIXMAPS=0
| andreas at morpheus:~/KDE-work/4.0/kdegames/kpat>execkde4 kgoldrunner
| kgoldrunner(10901) KGrTheme::load: New Theme - "/home/andreas/kde4/share/apps/kgoldrunner/themes/default.desktop"
| kgoldrunner(10901) KGrCanvas::changeTheme: 553 msec.  Finish loading new theme.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 2 QSize(953,702)
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 1197 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1586 msec.  Tiles and background rendered.
| rendering frames took  446 ms
| rendering frames took  489 ms
| rendering frames took  507 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1446 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 3 QSize(1680,929)
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 38 x 38
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 2270 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 2362 msec.  Tiles and background rendered.
| rendering frames took  428 ms
| rendering frames took  478 ms
| rendering frames took  504 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1412 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 4 QSize(953,702)
| kgoldrunner(10901) KGrCanvas::drawTheScene: 0 msec.  Start KGrCanvas::drawTheScene
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 1145 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1240 msec.  Tiles and background rendered.
| rendering frames took  432 ms
| rendering frames took  491 ms
| rendering frames took  517 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1442 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrTheme::load: New Theme - "/home/andreas/kde4/share/apps/kgoldrunner/themes/egypt.desktop"
| kgoldrunner(10901) KGrCanvas::changeTheme: 3512 msec.  Finish loading new theme.
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 1708 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 3117 msec.  Tiles and background rendered.
| rendering frames took  1970 ms
| rendering frames took  576 ms
| rendering frames took  599 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 3147 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 5 QSize(1680,929)
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 38 x 38
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 2497 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 3000 msec.  Tiles and background rendered.
| rendering frames took  1731 ms
| rendering frames took  605 ms
| rendering frames took  605 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 2942 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 6 QSize(953,702)
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 1626 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 2369 msec.  Tiles and background rendered.
| rendering frames took  1793 ms
| rendering frames took  600 ms
| rendering frames took  605 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 3000 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrTheme::load: New Theme - "/home/andreas/kde4/share/apps/kgoldrunner/themes/default.desktop"
| kgoldrunner(10901) KGrCanvas::changeTheme: 596 msec.  Finish loading new theme.
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 1083 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1477 msec.  Tiles and background rendered.
| rendering frames took  449 ms
| rendering frames took  499 ms
| rendering frames took  605 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1553 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 7 QSize(1680,929)
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 38 x 38
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 2278 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 2370 msec.  Tiles and background rendered.
| rendering frames took  427 ms
| rendering frames took  479 ms
| rendering frames took  505 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1413 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::resizeEvent: KGrCanvas::resizeEvent: 8 QSize(953,702)
| kgoldrunner(10901) KGrCanvas::drawTheScene: Called KGrCanvas::drawTheScene() - Images: 29 x 29
| kgoldrunner(10901) renderBackground: Trying to load background "background0"
| background took 1275 ms to render
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1373 msec.  Tiles and background rendered.
| rendering frames took  429 ms
| rendering frames took  554 ms
| rendering frames took  666 ms
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1655 msec.  Hero and enemies rendered.
| kgoldrunner(10901) KGrCanvas::drawTheScene: 1 msec.  Finish KGrCanvas::drawTheScene
| 
`----

> I'm interested in the last lines that are output to the console, that should 
> read something like those at the bottom of my message.

I hope I didn't left too much noise in the output.

Andreas

-- 
Your heart is pure, and your mind clear, and your soul devout.


More information about the kde-games-devel mailing list