1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use *;
/// How the fragment stage shades one vertex.
///
/// The kind travels with the vertex instead of being a uniform, because
/// the chart puts fills, strokes, labels, and images into one buffer and
/// draws them in the order the display list asks for. A per-vertex kind
/// is what makes that possible: the whole frame is one draw call, and
/// the paint order is the order of the triangles.
/// Which texture a batch samples.
///
/// The chart draws in batches: a batch is a run of consecutive triangles
/// that share a texture and a clip rectangle, and therefore cost exactly
/// one draw call. Splitting the frame by texture is the only split the
/// backend needs, because the glyph atlas and the images cannot be
/// sampled from one binding.
/// A gradient the frame uses.
///
/// Gradients are rare compared to plain colours, so they are collected
/// into a table instead of being baked into the vertices: every shape
/// that uses the same gradient points at the same row of the ramp
/// texture.
pub