I am trying to modify the SurfaceFlinger to implement a set of custom transforms on surface data.
As a first step, I am trying to identify to whom a layer belongs (i.e which uid/pid).
As the second step, I am trying to overlay an image onto one of the target layers from within the surface flinger.
How can I get this done? I've been reading the SurfaceFlinger code and the render loop calls the onDraw function
of all the layers being composited.
For example, one function is LayerBase::drawWithOpenGL. I have seen Jeff Sharkey's early example on alpha channel
hackery to reduce power consumption, but I'm not sure if I'm looking in the right place.
Any guidance is much appreciated.
PS: This is NOT for production or anything. Just personal experiments.