Overdraw

Also known as: GPU overdraw

On this page 7

Overdraw is the situation in which the graphics processor paints the same pixel more than once within a single frame, because several overlapping layers, backgrounds or views cover the same area of the screen. In mobile performance, GPU overdraw is a key measure of wasted rendering work, since every hidden layer still consumes fill rate, memory bandwidth and energy.

A small amount of overdraw is normal and often unavoidable, for example when text sits on a colored button. Excessive overdraw, typically three or more passes over large regions, can push frame rendering past the 16.7 ms budget of a 60 Hz display and contribute to jank, heat and battery drain.

How overdraw happens in the rendering pipeline

Overdraw arises because user interface toolkits draw views in back-to-front order, the classic painter’s algorithm. A window background is drawn first, then a container background, then a card, then text or an image. When each layer is opaque and full size, the pixels underneath are overwritten and the earlier work is thrown away.

The cost lands on the GPU fragment stage, where each pixel is shaded, blended and written to the framebuffer. Mobile GPUs are usually limited by fill rate and memory bandwidth rather than by geometry, so redundant pixel writes are especially expensive on phones and tablets. Alpha blending makes it worse, because a translucent pixel requires reading the existing value before writing the new one.

Developers usually describe overdraw as the number of times a pixel is drawn in one frame. The table below shows the common levels and how they are interpreted.

LevelPixel drawnTypical assessment
No overdrawOnceIdeal, rarely achievable everywhere
1x overdrawTwiceNormal and acceptable
2x overdrawThree timesAcceptable in small areas
3x overdrawFour timesWorth investigating
4x or moreFive or more timesLikely performance problem
Overdraw levels and their usual interpretation

Measuring GPU overdraw on Android and iOS

Both major mobile platforms provide tools that visualize overdraw directly on the device screen or in a frame capture. Measurement should always happen on a physical device, ideally a mid-range or low-end model, because emulators and flagship phones hide the problem.

On Android, the developer option Debug GPU overdraw tints every pixel by its draw count: true color for none, blue for 1x, green for 2x, pink for 3x and red for 4x or more. On iOS, the Color Blended Layers option in the Simulator and Instruments highlights layers that require blending, and Xcode frame capture shows per-pixel cost in Metal applications.

ToolPlatformWhat it reveals
Debug GPU overdrawAndroidColor-coded draw count per pixel
Profile GPU renderingAndroidPer-frame time bars by pipeline stage
Android GPU InspectorAndroidGPU counters and frame-level analysis
Color Blended LayersiOSLayers that need alpha blending
Xcode Instruments and Metal captureiOSGPU time, shader cost and pixel statistics
Tools for detecting overdraw

Visual tools show where overdraw occurs, but they do not prove that it matters. A screen covered in red may still render quickly if the GPU has headroom, so frame timing data from Android vitals, Instruments or a profiling run should confirm the actual impact.

Overdraw is one of several causes of slow frames, and diagnosing the wrong one wastes effort. The comparison below separates GPU overdraw from neighboring problems in the mobile performance toolbox.

ProblemWhere the cost occursTypical symptom
OverdrawGPU fragment shadingHigh GPU time with simple layouts
Deep view hierarchyCPU measure and layoutLong layout passes
Main thread blockingCPU application codeJank and, if prolonged, ANR
Offscreen renderingGPU extra render passesCostly shadows, masks or blurs
Texture uploadsCPU to GPU memory transferStutter when images first appear
Overdraw and other causes of rendering slowdowns

Overdraw is closely related to offscreen rendering on iOS, where masks, shadows without a defined path and group opacity force the GPU to render a layer into a separate buffer first. Both waste fill rate, but offscreen passes also add render target switches, which are particularly costly on tile-based mobile GPUs.

Reducing overdraw in mobile interfaces

The most effective fix is to remove backgrounds nobody can see. Many apps set a window background in the theme, then a full-screen background on the root layout and again on each fragment or screen, which creates two layers of overdraw before any content appears.

CauseFixExpected gain
Redundant window backgroundRemove it when content covers the screenOne full-screen layer
Stacked layout backgroundsKeep a background on one level onlyOne layer per removed background
Translucent views by defaultMark views opaque where possibleLess blending work
Hidden views still drawnRemove or set them to goneArea of the hidden view
Custom view drawing everythingClip drawing to visible regionsVariable, often large
Common causes of overdraw and their fixes

Further techniques include flattening view hierarchies, using clip rectangles in custom drawing code and, in game engines, rendering opaque geometry front to back so that the depth test rejects hidden fragments early. Modern compositors and Jetpack Compose perform some optimizations automatically, but they cannot remove a background the developer explicitly requested.

Limitations and common mistakes

Overdraw is a useful indicator, not a goal in itself. Chasing a screen with no tint at all can lead to fragile layouts and lost visual quality, while the measurable frame time barely changes on capable hardware.

  • Optimizing without profiling. Remove overdraw where frame time data shows GPU pressure.
  • Testing only on flagships. Low-end GPUs reveal fill-rate limits much earlier.
  • Ignoring translucency. Blended layers cost more than opaque layers of the same area.
  • Assuming the GPU hides everything. Hidden-surface removal on tile-based GPUs helps with opaque geometry, but not with blended pixels.

In plain words

Overdraw is like painting a wall several times when only the last coat will ever be seen. A phone screen is made of millions of tiny dots, and an app sometimes colors the same dot again and again because several layers sit on top of each other.

Each extra coat costs time and battery. Removing layers nobody sees makes the app smoother and lets the phone stay cooler.

A real-world example

A team building a news reader app for Android receives reports of choppy scrolling on budget phones. Profiling on a low-end device shows frames taking about 22 ms, well above the 16.7 ms target, with most time spent on the GPU.

Enabling Debug GPU overdraw turns most of the article list pink and red. The team finds a theme window background, a white root layout, a white list background and a white card background, all stacked. They remove three of the four backgrounds and make the image placeholders opaque.

After the change, the list shows mostly blue and true color, GPU time per frame falls to about 12 ms and scrolling becomes smooth. The slow frame rate reported in Android vitals drops noticeably in the next release.