HTC Magic – Android 1.6
1.1 Specification
The HTC Magic uses a Qualcomm® MSM7200A™ running at 528 MHz with a 3.2″ TFT-LCD flat touch-sensitive screen with 320×480 HVGA resolution.
1.2 Plain CPU Tests (no timer)
The Magic needs 3ms to clear the screen and using transparent 8bit images is the best choice for drawing the background (about 16ms or 60fps). Using a sprite sheet for animated sprites doesn’t need much more CPU power than drawing a single frame sprite (1.3ms compared to 1.4ms). The cpu consumption while drawing 8 sprites compared to 1 sprite is linear so the “8x sprite”-test returns an expected result (“24bit image” + “anim sprite” x 8 = “8x sprite + bg”). The resulting frame rate of about 29fps looks quite ok.
1.3 Timed Tests
The minimum timer resolutions is about 10ms which would give us about 100fps = ok. The first surprise is the clearRect test: 43ms or 23fps – for just clearing the canvas. With 3ms needed to clear the internal canvas this results in about 40ms for updating the actual screen = 25fps (ah ok. maybe minimum display frame rate). Let’s see what the other tests tell us. “8bit transparent” background drawing needs 76ms. Hmm, I’ve expected 40ms + 16ms = 56ms. If you update your whole background each frame you’ll have a fps of 13. Looks like you need a better strategy for updating your canvas. The last “8xsprite+bg” test isn’t linear, too. Would have expected 95+8 x 1.3 = 105ms, but it’s 125ms or 8fps. This doesn’t allow smooth animations or object movements…
1.4 Conclusion
The Magic is too slow if you need to update the whole background every frame while drawing some other objects afterwards and expecting a smooth animation or object movement. Redraw only that background area that really needs to be updated.
