compositionsurfacefactory
compositionsurfacefactory copied to clipboard
Create a resource management model
After finding out about some behavior around surfaces in apps that do work in the background (single process background audio is a key one), some sort of resource management is sorely needed. The surface factory needs to be able to track resources it has created, as well as nuke and rebuild those resources on request. That way apps that are going into the background can nuke their surface content and re-hydrate them when the app comes back to the foreground.
This probably also entails some events so that developers can create their own objects that implement some resource interface. As long as they fulfill the given contract, they should be able to tap into this resource management as well.