Zygote
How Android works

Graphics

Chromium-free rendering: how a frame gets from your code to your eyes.

6 pages74 min6 interactive10400 words
  1. 01The life of a frameFrom a touch to photons: how one frame moves through the UI thread, the RenderThread, the GPU, BufferQueue, SurfaceFlinger and the display — and why 16.67 ms is the number that governs everything.intermediate13 mininteractive
  2. 02Project ButterAndroid 4.1's answer to the lag everyone complained about: a vsync clock, triple buffering, and a framework object called Choreographer. Why the fix was structural, not a speed-up.intermediate12 mininteractive
  3. 03HWUI and the RenderThreadHow Android turns a view tree into GPU work: display lists, RenderNodes, the RenderThread that replays them, Skia's backends, and what 'hardware accelerated' actually promises.nerd13 mininteractive
  4. 04Surfaces and SurfaceFlingerA Surface is a queue of buffers, not a canvas. SurfaceFlinger is the compositor that decides which buffers become pixels. Between them they explain BLAST, overlays, and why SurfaceView beats TextureView for video.intermediate12 mininteractive
  5. 05GPU APIsOpenGL ES, Vulkan, EGL and the layers between your code and the graphics driver — plus why most apps never call any of them directly.nerd12 mininteractive
  6. 06Jank, measuredJank is not 'a slow app'. It is a specific missed deadline with a specific victim — the user's perception of cause and effect. How to measure it, what causes it, and how to tell which stage is at fault.intermediate12 mininteractive

Test yourself

Test yourself: Graphics

1 / 8

Put one BufferQueue slot's states in the order it passes through them, starting from free.

Drag, or use the arrows to reorder.

  1. 1DEQUEUED
  2. 2FREE
  3. 3ACQUIRED
  4. 4QUEUED
0 answered · 0 correct