Issues with Snapshots resuming on Android

Things are going well with our current project using Graphics 2.0, but we are looking to ship on Android and at the moment, it seems like there is an issue with resuming an application and having snapshots corrupted in the display.

Is this something that Corona is actively looking at? More than happy to work through more detailed examples, but for the moment, any snapshot displayed will be corrupted upon resuming.

Can you try adding a system event listener, and on the “applicationResume”, call “snapshot:invalidate()”? 

Also, if you are using the “discard” mode, you will not be able to recover your texture b/c the GPU is allowed to lose that data between a suspend/resume cycle.

Hi Walter,

Was planning on getting a simple example together, but you beat me to it. Using the discard mode is exactly what we are doing (painting masks onto multiple layers (snapshots) ).

Can you think of any way around this? This would be a big problem if this is lost during resume.

Thanks

David

Do you really need discard mode?

You can still use the canvas group either way. And the advantage of not using discard mode is that your previous edits are “saved” to the master snapshot.group, so when you call invalidate(), you can regenerate the texture upon a resume via snapshot:invalidate().

I’ll try your suggestion later today and let you know how it goes! Btw, does iOS work differently for this, because we have no issues on that platform?

Can you try adding a system event listener, and on the “applicationResume”, call “snapshot:invalidate()”? 

Also, if you are using the “discard” mode, you will not be able to recover your texture b/c the GPU is allowed to lose that data between a suspend/resume cycle.

Hi Walter,

Was planning on getting a simple example together, but you beat me to it. Using the discard mode is exactly what we are doing (painting masks onto multiple layers (snapshots) ).

Can you think of any way around this? This would be a big problem if this is lost during resume.

Thanks

David

Do you really need discard mode?

You can still use the canvas group either way. And the advantage of not using discard mode is that your previous edits are “saved” to the master snapshot.group, so when you call invalidate(), you can regenerate the texture upon a resume via snapshot:invalidate().

I’ll try your suggestion later today and let you know how it goes! Btw, does iOS work differently for this, because we have no issues on that platform?