title: Can I reuse SurfaceView to encode after display to screen?
body: <p>I am using OpenGLES2 output to display to a SurfaceView or encode to mp4 using MediaCodec.</p>
  <p>However, I can only do one at a time. I can obviously draw using OpenGLES2 onto two separate surfaces but that would be a really inefficient use of the GPU.</p>
  <p>What I want is to use some sort of reference counting to reuse the buffer to both draw on the screen and encode the single OpenGLES2 output. Like how camera service does in the Shared Surfaces concept.</p>
  <p>Can can one do both display and encode of a buffer? Is there some sort of tee element (like in GStreamer) present in Android?</p>