I've implemented a SurfaceView that receives callbacks from the
SurfaceHolder.

The first time that I rotate the screen the surfaceChanged callback
takes a long time (~5-10 seconds) to arrive.  This only happens the
first time that the screen is rotated. Subsequent rotations are near
instantaneous.

Coinciding with the prolonged callback is the following message:

07-20 17:40:09.153: WARN/SurfaceFlinger(568): timeout expired
mFreezeDisplay=0, mFreezeCount=1

I dug out the android code and found that the SurfaceFlinger class has
a member called mFreezeCount that is set through the following code in
the SurfaceFlinger class.

    status_t err = BnSurfaceComposer::onTransact(code, data, reply,
flags);
    if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) {
        // HARDWARE_TEST stuff...

... // skip

 case 1007: // set mFreezeCount
                mFreezeCount = data.readInt32();
                return NO_ERROR;

My question is whether anyone can explain what is setting the
mFreezeCount and whether there is anything that can be done in the
SurfaceView to avoid this from happening?

I am doing all rendering in the SurfaceView on the UI thread. The
onDraw is invoked by making calls to both invalidate() and
postInvalidate().

Many thanks for any help you can provide.

Lee
--~--~---------~--~----~------------~-------~--~----~
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