Hello, guys!

I've run into a little problem, need some advice.

I'm painting in SurfaceView, and I need to constantly fade one screen-sized 
bitmap into another. Something like a slideshow. 
I even simplified this drawing to draw one bitmap for testing purposes, and 
still I notice the slowness.

The code does something like this (pseudo):

void drawFrame()
{
        mPaint.setAlpha(progress); // progress varies from 0 to 255
        canvas.drawBitmap(mBitmap, 0, 0, mPaint); //mBitmap has screensize
}

and with this I get *noticable* lags while drawing. Well, these lags are not 
completely lenghty, but they are noticable indeed.
And if I add

canvas.drawColor(Color.BLACK);

to the beginning of the function then it becomes dog slow.

Is this supposed to be so? Am I doing something wrong?
Any suggestions on how could I improve this situation?

Thanks in advance,
Dmitry.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to