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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! The multi-pass paint plan: the data the shell needs to realize the filter
//! passes ([`Surface::Glass`](crate::Surface::Glass) backdrop blur and
//! foreground [`ElementFilter`]s) that a single vello scene cannot express.
//!
//! [`Frame::paint_backdrop`](crate::Frame::paint_backdrop) walks the tree in
//! [`PaintMode::Backdrop`], emitting one [`MultiPassSpec`] per filtered region
//! while painting a *backdrop scene* with every glass subtree skipped. The
//! shell renders that scene, reads the pixels back, blurs/filters each region on
//! the CPU, and feeds the resulting images to
//! [`Frame::paint_final`](crate::Frame::paint_final) (in [`PaintMode::Final`]),
//! which composites them into a second scene. A frame with no specs needs
//! neither extra pass — the backdrop scene *is* the final image, byte-for-byte
//! identical to the plain single-pass paint.
use HashMap;
use Rect;
use crateWidgetId;
use crateElementFilter;
/// One region the shell must filter out-of-band, recorded during the backdrop
/// walk and keyed back to its element by [`id`](Self::id).
/// The operation a [`MultiPassSpec`] applies to its region's pixels.
/// How [`Frame::paint_with`](crate::Frame) threads the multi-pass plan through
/// one tree walk. The non-glass, non-filtered walk is identical in all three
/// modes, so a frame with no filtered node renders byte-for-byte as it always
/// has.
pub