| OLD | NEW |
| 1 Test that layers can be nicely added or removed from a squashed layer, without u
nnecessary repaints on any layer. Click anywhere to test interactively; keep cli
cking to proceed through the test. | 1 Test that layers can be nicely added or removed from a squashed layer, without u
nnecessary repaints on any layer. Click anywhere to test interactively; keep cli
cking to proceed through the test. |
| 2 | 2 |
| 3 CASE 1, original layer tree with overlap1 and overlap2: | 3 CASE 1, original layer tree with overlap1 and overlap2: |
| 4 { | 4 { |
| 5 "bounds": [800, 600], | 5 "bounds": [800, 600], |
| 6 "children": [ | 6 "children": [ |
| 7 { | 7 { |
| 8 "bounds": [800, 600], | 8 "bounds": [800, 600], |
| 9 "contentsOpaque": true, | 9 "contentsOpaque": true, |
| 10 "drawsContent": true, | 10 "drawsContent": true, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 CASE 2, overlap3 gets added: | 32 CASE 2, overlap3 gets added: |
| 33 { | 33 { |
| 34 "bounds": [800, 600], | 34 "bounds": [800, 600], |
| 35 "children": [ | 35 "children": [ |
| 36 { | 36 { |
| 37 "bounds": [800, 600], | 37 "bounds": [800, 600], |
| 38 "contentsOpaque": true, | 38 "contentsOpaque": true, |
| 39 "drawsContent": true, | 39 "drawsContent": true, |
| 40 "repaintRects": [ | 40 "repaintRects": [ |
| 41 [300, 300, 100, 100], | |
| 42 [300, 300, 100, 100] | 41 [300, 300, 100, 100] |
| 43 ], | 42 ], |
| 44 "children": [ | 43 "children": [ |
| 45 { | 44 { |
| 46 "children": [ | 45 "children": [ |
| 47 { | 46 { |
| 48 "position": [60, 60], | 47 "position": [60, 60], |
| 49 "bounds": [400, 400], | 48 "bounds": [400, 400], |
| 50 "contentsOpaque": true, | 49 "contentsOpaque": true, |
| 51 "drawsContent": true, | 50 "drawsContent": true, |
| 52 "backgroundColor": "#808080" | 51 "backgroundColor": "#808080" |
| 53 }, | 52 }, |
| 54 { | 53 { |
| 55 "position": [140, 140], | 54 "position": [140, 140], |
| 56 "bounds": [260, 260], | 55 "bounds": [260, 260], |
| 57 "drawsContent": true, | 56 "drawsContent": true, |
| 58 "repaintRects": [ | 57 "repaintRects": [ |
| 59 [160, 160, 100, 100], | 58 [160, 160, 100, 100], |
| 60 [80, 80, 100, 100], | 59 [160, 160, 100, 100] |
| 61 [0, 0, 100, 100] | |
| 62 ] | 60 ] |
| 63 } | 61 } |
| 64 ] | 62 ] |
| 65 } | 63 } |
| 66 ] | 64 ] |
| 67 } | 65 } |
| 68 ] | 66 ] |
| 69 } | 67 } |
| 70 CASE 3, overlap2 gets removed. Since this does not resize the layer, there shoul
d only be a repaint of overlap2: | 68 CASE 3, overlap2 gets removed. Since this does not resize the layer, there shoul
d only be a repaint of overlap2: |
| 71 { | 69 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 83 "bounds": [400, 400], | 81 "bounds": [400, 400], |
| 84 "contentsOpaque": true, | 82 "contentsOpaque": true, |
| 85 "drawsContent": true, | 83 "drawsContent": true, |
| 86 "backgroundColor": "#808080" | 84 "backgroundColor": "#808080" |
| 87 }, | 85 }, |
| 88 { | 86 { |
| 89 "position": [140, 140], | 87 "position": [140, 140], |
| 90 "bounds": [260, 260], | 88 "bounds": [260, 260], |
| 91 "drawsContent": true, | 89 "drawsContent": true, |
| 92 "repaintRects": [ | 90 "repaintRects": [ |
| 93 [160, 160, 100, 100], | |
| 94 [80, 80, 100, 100] | 91 [80, 80, 100, 100] |
| 95 ] | 92 ] |
| 96 } | 93 } |
| 97 ] | 94 ] |
| 98 } | 95 } |
| 99 ] | 96 ] |
| 100 } | 97 } |
| 101 ] | 98 ] |
| 102 } | 99 } |
| 103 CASE 4, overlap1 gets removed: | 100 CASE 4, overlap1 gets removed: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 118 "drawsContent": true, | 115 "drawsContent": true, |
| 119 "backgroundColor": "#808080" | 116 "backgroundColor": "#808080" |
| 120 }, | 117 }, |
| 121 { | 118 { |
| 122 "position": [300, 300], | 119 "position": [300, 300], |
| 123 "bounds": [100, 100], | 120 "bounds": [100, 100], |
| 124 "drawsContent": true, | 121 "drawsContent": true, |
| 125 "repaintRects": [ | 122 "repaintRects": [ |
| 126 [160, 160, 100, 100], | 123 [160, 160, 100, 100], |
| 127 [0, 0, 100, 100], | 124 [0, 0, 100, 100], |
| 125 [0, 0, 100, 100], |
| 128 [0, 0, 100, 100] | 126 [0, 0, 100, 100] |
| 129 ] | 127 ] |
| 130 } | 128 } |
| 131 ] | 129 ] |
| 132 } | 130 } |
| 133 ] | 131 ] |
| 134 } | 132 } |
| 135 ] | 133 ] |
| 136 } | 134 } |
| 137 CASE 5, overlap2 gets added back: | 135 CASE 5, overlap2 gets added back: |
| 138 { | 136 { |
| 139 "bounds": [800, 600], | 137 "bounds": [800, 600], |
| 140 "children": [ | 138 "children": [ |
| 141 { | 139 { |
| 142 "bounds": [800, 600], | 140 "bounds": [800, 600], |
| 143 "contentsOpaque": true, | 141 "contentsOpaque": true, |
| 144 "drawsContent": true, | 142 "drawsContent": true, |
| 145 "repaintRects": [ | 143 "repaintRects": [ |
| 146 [220, 220, 100, 100], | |
| 147 [220, 220, 100, 100] | 144 [220, 220, 100, 100] |
| 148 ], | 145 ], |
| 149 "children": [ | 146 "children": [ |
| 150 { | 147 { |
| 151 "children": [ | 148 "children": [ |
| 152 { | 149 { |
| 153 "position": [60, 60], | 150 "position": [60, 60], |
| 154 "bounds": [400, 400], | 151 "bounds": [400, 400], |
| 155 "contentsOpaque": true, | 152 "contentsOpaque": true, |
| 156 "drawsContent": true, | 153 "drawsContent": true, |
| 157 "backgroundColor": "#808080" | 154 "backgroundColor": "#808080" |
| 158 }, | 155 }, |
| 159 { | 156 { |
| 160 "position": [220, 220], | 157 "position": [220, 220], |
| 161 "bounds": [180, 180], | 158 "bounds": [180, 180], |
| 162 "drawsContent": true, | 159 "drawsContent": true, |
| 163 "repaintRects": [ | 160 "repaintRects": [ |
| 164 [80, 80, 100, 100], | 161 [80, 80, 100, 100], |
| 162 [80, 80, 100, 100], |
| 165 [0, 0, 100, 100], | 163 [0, 0, 100, 100], |
| 166 [0, 0, 100, 100], | 164 [0, 0, 100, 100], |
| 167 [0, 0, 100, 100] | 165 [0, 0, 100, 100] |
| 168 ] | 166 ] |
| 169 } | 167 } |
| 170 ] | 168 ] |
| 171 } | 169 } |
| 172 ] | 170 ] |
| 173 } | 171 } |
| 174 ] | 172 ] |
| 175 } | 173 } |
| 176 CASE 6, overlap1 gets added back, and overlap3 gets removed: | 174 CASE 6, overlap1 gets added back, and overlap3 gets removed: |
| 177 { | 175 { |
| 178 "bounds": [800, 600], | 176 "bounds": [800, 600], |
| 179 "children": [ | 177 "children": [ |
| 180 { | 178 { |
| 181 "bounds": [800, 600], | 179 "bounds": [800, 600], |
| 182 "contentsOpaque": true, | 180 "contentsOpaque": true, |
| 183 "drawsContent": true, | 181 "drawsContent": true, |
| 184 "repaintRects": [ | 182 "repaintRects": [ |
| 185 [140, 140, 100, 100], | |
| 186 [140, 140, 100, 100] | 183 [140, 140, 100, 100] |
| 187 ], | 184 ], |
| 188 "children": [ | 185 "children": [ |
| 189 { | 186 { |
| 190 "children": [ | 187 "children": [ |
| 191 { | 188 { |
| 192 "position": [60, 60], | 189 "position": [60, 60], |
| 193 "bounds": [400, 400], | 190 "bounds": [400, 400], |
| 194 "contentsOpaque": true, | 191 "contentsOpaque": true, |
| 195 "drawsContent": true, | 192 "drawsContent": true, |
| 196 "backgroundColor": "#808080" | 193 "backgroundColor": "#808080" |
| 197 }, | 194 }, |
| 198 { | 195 { |
| 199 "position": [140, 140], | 196 "position": [140, 140], |
| 200 "bounds": [180, 180], | 197 "bounds": [180, 180], |
| 201 "drawsContent": true, | 198 "drawsContent": true, |
| 202 "repaintRects": [ | 199 "repaintRects": [ |
| 203 [80, 80, 100, 100], | 200 [80, 80, 100, 100], |
| 204 [80, 80, 100, 100], | 201 [80, 80, 100, 100], |
| 202 [80, 80, 100, 100], |
| 205 [0, 0, 100, 100], | 203 [0, 0, 100, 100], |
| 206 [0, 0, 100, 100], | 204 [0, 0, 100, 100], |
| 207 [0, 0, 100, 100] | 205 [0, 0, 100, 100] |
| 208 ] | 206 ] |
| 209 } | 207 } |
| 210 ] | 208 ] |
| 211 } | 209 } |
| 212 ] | 210 ] |
| 213 } | 211 } |
| 214 ] | 212 ] |
| 215 } | 213 } |
| 216 | 214 |
| OLD | NEW |