Tuesday, March 5, 2013

Re: [android-developers] Re: how to tell why Activity.onPause() is called



W dniu środa, 6 marca 2013 00:06:32 UTC+1 użytkownik RichardC napisał:

On Tuesday, March 5, 2013 10:20:38 PM UTC, a1 wrote:

Oh my god, really? We are in 2009 again or something? Since Android 3.0, you can call setPreserveEGLContextOnPause method to prevent GLSurfaceView from releasing context, if you are targeting older version simply back-port (or use one of existing back-ports eg. the one from Replica Island).

The context  may still be lost if for example another OpenGL app runs.  The preserve context only prevents GLSurfaceView from releasing it to "play nice", it does not prevent the OpenGL driver from forcibly removing it from you if it needs the resources.
 
It's not true: driver is not allowed to forcibly remove context if it needs resources - context may be lost only due to power management events - think about deep sleep or hibernation. It's common that OS teardown process when user navigates away and given process consumes a lot of RAM you can emulate this by enabling developer option: "don't keep activities). 

--
Bart

--
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment