Hello,
I'm curious about the state of multiprocess rendering in Android. In particular, I'm interested in creating an Application with a SurfaceView that interacts with a Service, which runs GL commands. This architecture is similar to Chrome's GPU process, and I'm interested in this design for the same reasons they are.
I know that one way to implement this is with the GraphicBuffer wrapper around gralloc. This works because the namespace that gralloc operates on is shared among processes, so if one process creates a GraphicBuffer, another process can use that as a texture to show whatever the first process renders, by way of an EGLImage. (Please correct me if I'm wrong)
However, the GraphicBuffer api isn't one of the NDK's "Stable APIs." Indeed, it appears that it has been taken out in recent versions of Android.
Hopefully, there is (or will be) a way to simply give an opaque handle of a window (like an XID) to another process and let the other process create a EGL onscreen context around it. Is there a way to do this? If not, are there plans to implement something like this?
Is there a best practice for multiprocess rendering?
Thanks,
Myles C. Maxfield