OLD | NEW |
| (Empty) |
1 Basic repaint test for squashed layers. The entire squashing layer should not ne
ed repainting when only a portion of it is invalidated. Test interactively by us
ing --show-paint-rects and hovering over elements to change their color. | |
2 | |
3 CASE 1, original layer tree: | |
4 { | |
5 "bounds": [800, 600], | |
6 "children": [ | |
7 { | |
8 "bounds": [800, 600], | |
9 "contentsOpaque": true, | |
10 "drawsContent": true, | |
11 "children": [ | |
12 { | |
13 "children": [ | |
14 { | |
15 "position": [60, 60], | |
16 "bounds": [100, 100], | |
17 "contentsOpaque": true, | |
18 "drawsContent": true, | |
19 "backgroundColor": "#808080" | |
20 }, | |
21 { | |
22 "position": [140, 140], | |
23 "bounds": [260, 260], | |
24 "drawsContent": true | |
25 } | |
26 ] | |
27 } | |
28 ] | |
29 } | |
30 ] | |
31 } | |
32 CASE 2, overlap1 changes color: | |
33 { | |
34 "bounds": [800, 600], | |
35 "children": [ | |
36 { | |
37 "bounds": [800, 600], | |
38 "contentsOpaque": true, | |
39 "drawsContent": true, | |
40 "children": [ | |
41 { | |
42 "children": [ | |
43 { | |
44 "position": [60, 60], | |
45 "bounds": [100, 100], | |
46 "contentsOpaque": true, | |
47 "drawsContent": true, | |
48 "backgroundColor": "#808080" | |
49 }, | |
50 { | |
51 "position": [140, 140], | |
52 "bounds": [260, 260], | |
53 "drawsContent": true, | |
54 "repaintRects": [ | |
55 [0, 0, 100, 100], | |
56 [0, 0, 100, 100] | |
57 ] | |
58 } | |
59 ] | |
60 } | |
61 ] | |
62 } | |
63 ] | |
64 } | |
65 CASE 3, overlap1 and overlap2 change color: | |
66 { | |
67 "bounds": [800, 600], | |
68 "children": [ | |
69 { | |
70 "bounds": [800, 600], | |
71 "contentsOpaque": true, | |
72 "drawsContent": true, | |
73 "children": [ | |
74 { | |
75 "children": [ | |
76 { | |
77 "position": [60, 60], | |
78 "bounds": [100, 100], | |
79 "contentsOpaque": true, | |
80 "drawsContent": true, | |
81 "backgroundColor": "#808080" | |
82 }, | |
83 { | |
84 "position": [140, 140], | |
85 "bounds": [260, 260], | |
86 "drawsContent": true, | |
87 "repaintRects": [ | |
88 [80, 80, 100, 100], | |
89 [80, 80, 100, 100], | |
90 [0, 0, 100, 100], | |
91 [0, 0, 100, 100] | |
92 ] | |
93 } | |
94 ] | |
95 } | |
96 ] | |
97 } | |
98 ] | |
99 } | |
100 CASE 4, overlap2 and overlap3 change color: | |
101 { | |
102 "bounds": [800, 600], | |
103 "children": [ | |
104 { | |
105 "bounds": [800, 600], | |
106 "contentsOpaque": true, | |
107 "drawsContent": true, | |
108 "children": [ | |
109 { | |
110 "children": [ | |
111 { | |
112 "position": [60, 60], | |
113 "bounds": [100, 100], | |
114 "contentsOpaque": true, | |
115 "drawsContent": true, | |
116 "backgroundColor": "#808080" | |
117 }, | |
118 { | |
119 "position": [140, 140], | |
120 "bounds": [260, 260], | |
121 "drawsContent": true, | |
122 "repaintRects": [ | |
123 [160, 160, 100, 100], | |
124 [160, 160, 100, 100], | |
125 [80, 80, 100, 100], | |
126 [80, 80, 100, 100] | |
127 ] | |
128 } | |
129 ] | |
130 } | |
131 ] | |
132 } | |
133 ] | |
134 } | |
135 CASE 5, overlap3 and overlap1 change color: | |
136 { | |
137 "bounds": [800, 600], | |
138 "children": [ | |
139 { | |
140 "bounds": [800, 600], | |
141 "contentsOpaque": true, | |
142 "drawsContent": true, | |
143 "children": [ | |
144 { | |
145 "children": [ | |
146 { | |
147 "position": [60, 60], | |
148 "bounds": [100, 100], | |
149 "contentsOpaque": true, | |
150 "drawsContent": true, | |
151 "backgroundColor": "#808080" | |
152 }, | |
153 { | |
154 "position": [140, 140], | |
155 "bounds": [260, 260], | |
156 "drawsContent": true, | |
157 "repaintRects": [ | |
158 [160, 160, 100, 100], | |
159 [160, 160, 100, 100], | |
160 [0, 0, 100, 100], | |
161 [0, 0, 100, 100] | |
162 ] | |
163 } | |
164 ] | |
165 } | |
166 ] | |
167 } | |
168 ] | |
169 } | |
170 | |
OLD | NEW |