Skip to content
Archive of entries posted on March 2010

Implementing AntSnes with Qt part 5: Implementing the Blit

The current Qt version is implemented on top of the old Avkon layer, and it really doesn’t have fast blitting methods available. Therefore I Implemented the blit with Symbian’s Anti-Tearing API, which should be the fastest available method to draw on the screen. has a very good example how to use the Anti-tearing API.

There’s a ton of Qt blog posts about graphics performance, so I’m not going though all that stuff again. Here’s one really good post about the performance: I’ll make an update for the fast blit, when there’s real hardware acceleration for Qt in Symbian available, so I can make some benchmarking as well. Until then I’m going with the Anti-Tearing API.

For the blitting I’m using the scaling function I described in the my earlier blog post fast image scaling. The render function is implemented as Qt slot, so I can call it from another thread, see also my post about the worker thread.

Here’s the rendering function.

void QBlitterWidget::render()
 if (IsActive())
 TAcceleratedBitmapInfo bitmapInfo;
 bitmapdata = (TUint8*) bitmapInfo.iAddress;
 //blit the data
 bitmapBlit( g_screenptr, bitmapInfo.iAddress);