OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <style> | |
5 .shouldCompositeAndHaveGpuHint { | |
6 position: absolute; | |
7 width: 50px; | |
8 height: 50px; | |
9 background-color: green; | |
10 } | |
11 | |
12 .shouldCompositeButNotHaveGpuHint { | |
13 position: absolute; | |
14 width: 50px; | |
15 height: 50px; | |
16 background-color: blue; | |
17 } | |
18 | |
19 .shouldNotComposite { | |
20 position: absolute; | |
21 width: 50px; | |
22 height: 50px; | |
23 background-color: red; | |
24 } | |
25 | |
26 #willChangeAuto { | |
27 will-change: auto; | |
28 top: 0px; | |
29 left: 0px; | |
30 } | |
31 | |
32 #willChangeZIndex { | |
33 will-change: z-index; | |
34 top: 0px; | |
35 left: 60px; | |
36 } | |
37 | |
38 #willChangeOpacity { | |
39 will-change: opacity; | |
40 top: 0px; | |
41 left: 120px; | |
42 } | |
43 | |
44 #willChangeContents { | |
45 will-change: contents; | |
46 top: 60px; | |
47 left: 0px; | |
48 } | |
49 | |
50 #willChangeWidth { | |
51 will-change: width; | |
52 top: 60px; | |
53 left: 60px; | |
54 } | |
55 | |
56 #willChangeHeight { | |
57 will-change: height; | |
58 top: 60px; | |
59 left: 120px; | |
60 } | |
61 | |
62 #willChangeCombination { | |
63 will-change: z-index, width, position; | |
64 top: 120px; | |
65 left: 0px; | |
66 } | |
67 </style> | |
68 | |
69 <script> | |
70 if (window.internals) | |
71 window.internals.settings.setAcceleratedCompositingForGpuRasterizationHint Enabled(true); | |
72 | |
73 if (window.testRunner) { | |
74 testRunner.dumpAsText(); | |
75 testRunner.waitUntilDone(); | |
76 } | |
77 | |
78 window.addEventListener('load', function() { | |
79 if (window.testRunner) { | |
80 document.getElementById("layertree").innerText = window.internals.layerT reeAsText(document); | |
Ian Vollick
2014/03/07 15:33:52
Nit: it would be nice to have a flag to optionally
ajuma
2014/03/07 17:03:41
This would be of limited value right now, since on
| |
81 testRunner.notifyDone(); | |
82 } | |
83 }, false); | |
84 </script> | |
85 </head> | |
86 <body> | |
87 <div id="willChangeAuto" class="shouldNotComposite"></div> | |
88 <div id="willChangeZIndex" class="shouldNotComposite"></div> | |
89 <div id="willChangeOpacity" class="shouldCompositeButNotHaveGpuHint"></div> | |
90 <div id="willChangeContents" class="shouldCompositeAndHaveGpuHint"></div> | |
91 <div id="willChangeWidth" class="shouldCompositeAndHaveGpuHint"></div> | |
92 <div id="willChangeHeight" class="shouldCompositeAndHaveGpuHint"></div> | |
93 <div id="willChangeCombination" class="shouldCompositeAndHaveGpuHint"></div> | |
94 | |
95 <pre id="layertree"></pre> | |
96 </body> | |
97 </html> | |
OLD | NEW |