PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

gapi overhead between frames???

I'm developing with GD204 for the Smartphone 2002 (though this applies on GD202 as well), and whilst doing some speed analysis for optimisation I found that there was about 7ms per frame that I couldn't account for.

So I created a very basic ProcessNextFrame function that only prints the ActualFrameTime from the built in timer routines - and nothing else, no clearing screen or anything

and sure enough, it turns out that there is a 5-8ms delay between frames (varies slightly as the phone does it's thing in the background with the app running)

the rest of the project is basically the 'Simple' example included with the library - no other code outside the ProcessNextFrame loop at all

does anyone know what is causing the overhead? or even better, if it can be reduced/removed?

thanks in advance

muff
Hi,

The overhead is caused by copying the back buffer to the display. Your device most probably does not have a double buffered display, which means GapiDraw has to copy the entire backbuffer from sysmem to display on each Flip()...
johan : many thanks for the reply

I'd forgotten that the backbuffer being flipped was going to be taking time (obvious when someone reminds you :roll: )

still got some missing time though :(

I know that GD can blit a screen this size on the phone in around 4ms - so there is still around 3ms (on average) as yet unnaccounted for

or does the backbuffer flip do more than the 1 blit I'm thinking it does?

of course it could just be that I'm trying to squeeze too much out of this little phone ;)