androidsurfaceviewglsurfaceviewtextureviewsurfaceflinger

How do I use Android’s “Surface” classes?


Is there a detailed explanation of Surface, SurfaceHolder, EGLSurface, SurfaceView, GLSurfaceView, SurfaceTexture, and TextureView?  In particular:


Solution

  • The answers to these and many other questions can now be found on the Android Open Source Project web site:

    Android System-Level Graphics

    The document begins with an explanation of the low-level infrastructure, and then explains how the higher-level features are built from them. The goal is not to provide direct answers to common questions, but rather to describe the system at a level of detail that makes the answers apparent without being overwhelming.

    The choice of material and level of detail were heavy influenced by Q&A on stackoverflow.

    (Technically this is a link-only answer, but writing 10,000 words here seemed like a bad idea.)