I'm trying to keep some rendering going on (without resetting it) even upon destroy and re-creation of my activity (due to an orientation change).
I took a look into Grafika's DoubleDecodeActivity, which is very clarifying on how to do it. However, it does it by using a TextureView
, which is less efficient, since the drawn frames don't get passed directly to the surface compositor (SurfaceFlinger). My user experience becomes compromised. What I need is a GLSurfaceView
(or maybe a SurfaceView
).
The problem is I don't know how to persist the SurfaceView
's "SurfaceTexture
" (if that's a thing) across different instances of my activity.
Can someone please help me out with this?