Conditions Requiring a Stream Surface
In the absence of an underlying window system, the stream surface is necessary for on screen rendering. Stream surfaces behave like any other EGLSurface. For example, the eglSwapBuffers
function must still be called to indicate the end of a frame. However, stream surfaces are stream producers, so eglSwapBuffers
submits rendering to the stream rather than presenting it to a native window directly. Typically, an EGLOutput consumer can use any producer attached to the stream but needs a surface producer when rendering API is OpenGL. For more information, see Creating a Stream Surface in this topic.
A common use case for stream producer surfaces is an application producing display frames using OpenGL, attached as a producer to one end of an EGL stream. The stream consumer on the other end is an EGLOutput layer sending frames directly to a display device.