Skip to content
CURIOUS CREATURE

Android · Graphics & UI · 2010-12-02

Comment Page 1

Android graphics work becomes predictable when geometry, state, invalidation, allocation, and the rendering pipeline are considered together.

01

Define the geometry

State bounds, coordinate space, clipping, density, and transformation order before styling the result.

02

Control state

Keep mutable drawing state local and make invalidation follow the smallest region or subtree that actually changed.

03

Watch the budget

Reuse objects in hot draw paths, inspect overdraw, and test on a device where missed frames are visible.

Working rule

Make the next measurement cheaper than the next argument.

Keep a minimal reproduction close to the observation. Change one variable at a time, preserve the failing path, and prefer before-and-after evidence over a broad rewrite.