Poor performance of Android Canvas.drawBitmap - switch to OpenGL? -



Poor performance of Android Canvas.drawBitmap - switch to OpenGL? -

i'm porting 2d action game windows phone 7 (developed in xna 4.0) on android. i'm using lot of canvas.drawbitmap() calls - around 200-300 per frame update - different paints each phone call handle varying transparency , colourisation @ draw-time. managing particle systems , various other overlays , in-game effects tiled background , in-game sprites. i'm not doing on-demand resizing or rotating, it's simple src->dest rectangles of same size.

on wp7 runs @ 30+fps i'm struggling 12fps on test 'droid hardware (samsung galaxy s). making game unplayable. having profiled code, i've confirmed time beingness lost in canvas.drawbitmap()

i seem next usual performance advice - using surfaceview, mindful of gc not creating loads of throwaway objects, , avoiding drawables.

am right in understanding canvas.drawbitmap() cpu-bound, , if want improve performance have switch opengl utilize gpu? can't find stated baldly anywhere, reading between lines of comments think might have next step...?

this normal. canvas amazingly slow when using transparency (like argb_8888).

2 options:

switch opengl es use to the lowest degree possible transparency on bitmaps (i.e utilize rgb_565 can).

android opengl-es xna frame-rate android-canvas

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -