Have you made sure your SurfaceView UI is actually drawing regularly, and
especially redrawing itself as soon as possible with the new size?

On Wed, Jul 21, 2010 at 8:02 AM, Matty <busbus...@gmail.com> wrote:

> Thanks for the quick response Dianne.
>
> I have an activity that uses OpenGL, and if I rotate  at just the
> right time, the log prints
>
> W/SurfaceComposerClient(  749): lock_layer timed out (is the CPU
> pegged?) layer=2, lcblk=0x420d0120, state=0000000e (was 0000000e)
>
> I basically don't want the Activity to hang.  I'm using a plain
> android.opengl.GLSurfaceView.
>
> There are 2 activities involved. A,B.  B is started from A using
> startActivityForResult, and is "translucent".  On rotate, both finish,
> and then I start A (which might work) which then starts an intent for
> B.  If I rotate at the right time, I see the message above, and
> sometimes Activity A draws properly, but usually not quite (only draws
> some of the screen, or a rotated version of the opposite orientation),
> and it seems like B is somehow blocked because of the message above.
> Activity B has the GLSurfaceView.
>
> Any advice is greatly appreciated.
>
>
>
>
> On Jul 21, 9:22 am, Dianne Hackborn <hack...@android.com> wrote:
> > What problem is this causing you that you are trying to fix?
> >
> >
> >
> > On Wed, Jul 21, 2010 at 5:47 AM, Matty <busbus...@gmail.com> wrote:
> > > I have looked through many posts on this issue, and I've concluded
> > > that there's not much I can do to prevent it... I am able to reproduce
> > > this error when repeatedly rotating an Activity that uses OpenGL.
> >
> > > W/SurfaceComposerClient(  749): lock_layer timed out (is the CPU
> > > pegged?) layer=2, lcblk=0x420d0120, state=0000000e (was 0000000e)
> >
> > > For reference:
> > > I'm calling GLSurfaceView.onPause() and onResume() on activity pause
> > > and resume...
> >
> > > My question is:
> > > Can I detect this error in my java code, so I can try to do something
> > > extra to correct it?
> > > Is there an ErrorListener, or an object I can access to find out about
> > > when this occurs? I have tried
> > > ((EGL10) EGLContext.getEGL()).eglGetError();
> > > but does not report an error.  I'm guessing I'd need some sort of
> > > Surface object?
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> <android-developers%2bunsubscr...@googlegroups.com<android-developers%252bunsubscr...@googlegroups.com>
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Dianne Hackborn
> > Android framework engineer
> > hack...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time to
> > provide private support, and so won't reply to such e-mails.  All such
> > questions should be posted on public forums, where I and others can see
> and
> > answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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

Reply via email to