This is what I found.
From the eclipse graphic documentation:
Note: On each pass you retrieve the Canvas from the SurfaceHolder, the previous state of the Canvas will be retained. In order to properly animate your graphics, you must re-paint the entire surface. For example, you can clear the previous state of the Canvas by filling in a color with drawColor() or setting a background image with drawBitmap(). Otherwise, you will see traces of the drawings you previously performed
So the code I used is as follows:
in onCreate()
mBitmapBase = BitmapFactory.decodeResource(getResources(), R.drawable.bidBackground);
in onSurfaceChanged()
// size the background bitmap so it draws efficiently
mBitmapBackground = Bitmap.createScaledBitmap(mBitmapBackground, xMax, yMax, true);
and in Run()
try
{
canvas = sHolder.lockCanvas();
if (canvas != null)
canvas.drawBitmap(mBitmapBackground, 0, 0, null);
As far as I can tell this is as efficient as it can get. Although if anybody can correct me on this I would love to hear it.