Revision edd106f...

Go back to digest for 18th May 2014

Optimization in Games

Roney Gomes committed changes in [kbounce] /:

Performance Improvementes

Thomas Lübking sent a few weeks ago a patch proposing some fixes to
KBounce's performance issues, most of them related to intese CPU usage
due unecessary calls to the game renderer.

This commit is enormous because I added some extra code on top of Thomas
work. What I did:

Changed to static the access modifier of the renderer shared by all
KBounceWall instances.

Created a new static method for reloading the sprites of a wall. This
method is called during each resize but also after a theme change.

Thomas didn't see spot that bug thus after a theme change the wall kept
being painted with the sprite used in the previous theme.

Thomas's work is better explained in the Review Board entry referenced
below.


REVIEW: 117785

File Changes

Modified 6 files
  •   board.cpp
  •   board.h
  •   gameobject.h
  •   gamewidget.cpp
  •   wall.cpp
  •   wall.h
6 files changed in total