Each operation is one byte, then its fields. f is a 32-bit float, i a 32-bit integer, b a byte.
| Operation | Code | Fields |
|---|---|---|
SAVE | 1 | |
RESTORE | 2 | |
TRANSLATE | 4 | f dx, f dy |
SCALE | 5 | f sx, f sy |
ROTATE | 6 | f degrees |
CONCAT | 7 | 9 f, Matrix.getValues() order |
SET_MATRIX | 8 | 9 f, relative to the node's transform |
CLIP_RECT | 10 | f left, top, right, bottom, b op (0 intersect, 1 difference) |
CLIP_PATH | 11 | a path, b op |
DRAW_COLOR | 12 | i color (ARGB), b blend |
DRAW_PAINT | 13 | a paint |
DRAW_RECT | 14 | f left, top, right, bottom, a paint |
DRAW_RRECT | 15 | f left, top, right, bottom, rx, ry, a paint |
DRAW_OVAL | 16 | f left, top, right, bottom, a paint |
DRAW_CIRCLE | 17 | f cx, cy, radius, a paint |
DRAW_ARC | 18 | f left, top, right, bottom, start, sweep, b useCenter, a paint |
DRAW_LINES | 19 | i count, count f (x0, y0, x1, y1 for each line), a paint |
DRAW_POINTS | 20 | i count, count f, a paint |
DRAW_PATH | 21 | a path, a paint |
DRAW_GLYPHS | 22 | i font, f size, scaleX, skew, b fakeBold, i n, n i glyph IDs, 2n f positions, a paint |
DRAW_BITMAP | 23 | i bitmap, f source rectangle, f destination rectangle, a paint |
SAVE_LAYER | 25 | f left, top, right, bottom, i alpha, b blend |
NODE_BEGIN | 30 | 9 f transform in the parent, f alpha, width, height, b clipToBounds, the outline clip, the clip rectangle |
NODE_END | 31 |
A path is b fillType (Path.FillType's order), i verbs, i floats, the verbs as bytes (move 0, line 1,
quad 2, cubic 3, close 4), then the floats of their points.
A paint is i color, b style, cap, join, flags, f strokeWidth, miter, b blend (Skia's SkBlendMode
numbers), b shader kind, filter kind, dash count. Then, when they are there:
b tileX, tileY, a 16-bit color count, 6 f points, 9 f local matrix, the colors as i, b has
positions and 3 bytes, the positions as f, i bitmap,i color, b blend and 3 bytes. Kind 2 is a color matrix of 20 f,f phase, then the intervals.The outline clip of a node is b 0 for none, 1 for a rounded rectangle (f left, top, right, bottom, radius)
and 2 for a path. Its clip rectangle is b 0, or 1 and f left, top, right, bottom.
Made from docs/platforms/android-apps/hwui.md at 69237645142c. GPL-3.0-or-later.