Android UI Internal : UI Composition with SurfaceFlinger

SurfaceFlinger is an Android system service, responsible for compositing all the application and system surfaces into a single buffer that is finally to be displayed by display controller.

Android graphics components

Figure 1. How surfaces are rendered

following diagram for a depiction of the Android graphics pipeline:

Figure 2. Graphic data flow through Android

BufferQueue

BufferQueues provide the glue between the Android graphics components. These are a pair of queues that mediate the constant cycle of buffers from the producer to the consumer. Once the producers hand off their buffers, SurfaceFlinger is responsible for compositing everything onto the display.

See the following diagram for the BufferQueue communication process.

Figure 3. BufferQueue communication process

mobidroid

Technology leader for android

)

Pragati Singh ⭐️⭐️⭐️⭐️⭐️

Written by

Android Developer Advocate & Architect ✔Technology Leader ✔Life Coach #techentrepreneur #polyglot programer #BuildBetterApp

mobidroid

mobidroid

Technology leader for android

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade