1 Test that layers can be nicely added or removed from a squashed layer, without unnecessary repaints on any layer. Click anywhere to test interactively; keep clicking to proceed through the test.
3 CASE 1, original layer tree with overlap1 and overlap2:
9 "contentsOpaque": true,
13 "shouldFlattenTransform": false,
18 "contentsOpaque": true,
20 "backgroundColor": "#808080"
23 "position": [140, 140],
33 CASE 2, overlap3 gets added:
39 "contentsOpaque": true,
43 "shouldFlattenTransform": false,
48 "contentsOpaque": true,
50 "backgroundColor": "#808080"
53 "position": [140, 140],
66 CASE 3, overlap2 gets removed. Since this does not resize the layer, there should only be a repaint of overlap2:
72 "contentsOpaque": true,
76 "shouldFlattenTransform": false,
81 "contentsOpaque": true,
83 "backgroundColor": "#808080"
86 "position": [140, 140],
99 CASE 4, overlap1 gets removed:
101 "bounds": [800, 600],
104 "bounds": [800, 600],
105 "contentsOpaque": true,
106 "drawsContent": true,
109 "shouldFlattenTransform": false,
112 "position": [60, 60],
113 "bounds": [400, 400],
114 "contentsOpaque": true,
115 "drawsContent": true,
116 "backgroundColor": "#808080"
119 "position": [300, 300],
120 "bounds": [100, 100],
121 "drawsContent": true,
123 [160, 160, 100, 100],
134 CASE 5, overlap2 gets added back:
136 "bounds": [800, 600],
139 "bounds": [800, 600],
140 "contentsOpaque": true,
141 "drawsContent": true,
144 "shouldFlattenTransform": false,
147 "position": [60, 60],
148 "bounds": [400, 400],
149 "contentsOpaque": true,
150 "drawsContent": true,
151 "backgroundColor": "#808080"
154 "position": [220, 220],
155 "bounds": [180, 180],
156 "drawsContent": true,
170 CASE 6, overlap1 gets added back, and overlap3 gets removed:
172 "bounds": [800, 600],
175 "bounds": [800, 600],
176 "contentsOpaque": true,
177 "drawsContent": true,
180 "shouldFlattenTransform": false,
183 "position": [60, 60],
184 "bounds": [400, 400],
185 "contentsOpaque": true,
186 "drawsContent": true,
187 "backgroundColor": "#808080"
190 "position": [140, 140],
191 "bounds": [180, 180],
192 "drawsContent": true,