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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
Basic repaint test for squashed layers. The entire squashing layer should not need repainting when only a portion of it is invalidated. Test interactively by using --show-paint-rects and hovering over elements to change their color.
CASE 1, original layer tree:
{
"bounds": [800, 600],
"children": [
{
"bounds": [800, 600],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"shouldFlattenTransform": false,
"children": [
{
"position": [60, 60],
"bounds": [100, 100],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#808080"
},
{
"position": [140, 140],
"bounds": [260, 260],
"drawsContent": true
}
]
}
]
}
]
}
CASE 2, overlap1 changes color:
{
"bounds": [800, 600],
"children": [
{
"bounds": [800, 600],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"shouldFlattenTransform": false,
"children": [
{
"position": [60, 60],
"bounds": [100, 100],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#808080"
},
{
"position": [140, 140],
"bounds": [260, 260],
"drawsContent": true,
"repaintRects": [
[0, 0, 100, 100]
]
}
]
}
]
}
]
}
CASE 3, overlap1 and overlap2 change color:
{
"bounds": [800, 600],
"children": [
{
"bounds": [800, 600],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"shouldFlattenTransform": false,
"children": [
{
"position": [60, 60],
"bounds": [100, 100],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#808080"
},
{
"position": [140, 140],
"bounds": [260, 260],
"drawsContent": true,
"repaintRects": [
[80, 80, 100, 100],
[0, 0, 100, 100]
]
}
]
}
]
}
]
}
CASE 4, overlap2 and overlap3 change color:
{
"bounds": [800, 600],
"children": [
{
"bounds": [800, 600],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"shouldFlattenTransform": false,
"children": [
{
"position": [60, 60],
"bounds": [100, 100],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#808080"
},
{
"position": [140, 140],
"bounds": [260, 260],
"drawsContent": true,
"repaintRects": [
[160, 160, 100, 100],
[80, 80, 100, 100]
]
}
]
}
]
}
]
}
CASE 5, overlap3 and overlap1 change color:
{
"bounds": [800, 600],
"children": [
{
"bounds": [800, 600],
"contentsOpaque": true,
"drawsContent": true,
"children": [
{
"shouldFlattenTransform": false,
"children": [
{
"position": [60, 60],
"bounds": [100, 100],
"contentsOpaque": true,
"drawsContent": true,
"backgroundColor": "#808080"
},
{
"position": [140, 140],
"bounds": [260, 260],
"drawsContent": true,
"repaintRects": [
[160, 160, 100, 100],
[0, 0, 100, 100]
]
}
]
}
]
}
]
}
|