I am trying to find the best way (preformance-wise) to draw a large Bitmap to a SurfaceView in Android as a stationary background image. I am currently just using the Canvas.drawBitmap() method but it brings my FPS down by a lot. What are some ways that I can speed this up?
I am trying to find the best way (preformance-wise) to draw a large Bitmap
Share
Try to use an opaque image and set the Xfermode on the Paint to either null or PorterDuff.Mode.SRC. This will disable blending which can be expensive. Also make sure your image is not stretched (no scaling) and that it’s in the same format as the surfaceview’s surface.