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 #willChangeBackgroundColor { |
| 63 will-change: background-color; |
| 64 top: 120px; |
| 65 left: 0px; |
| 66 } |
| 67 |
| 68 #willChangeBackgroundPosition { |
| 69 will-change: background-position; |
| 70 top: 120px; |
| 71 left: 60px; |
| 72 } |
| 73 |
| 74 #willChangeCombination { |
| 75 will-change: z-index, width, position; |
| 76 top: 120px; |
| 77 left: 120px; |
| 78 } |
| 79 </style> |
| 80 |
| 81 <script> |
| 82 if (window.internals) |
| 83 window.internals.settings.setAcceleratedCompositingForGpuRasterizationHint
Enabled(true); |
| 84 |
| 85 if (window.testRunner) { |
| 86 testRunner.dumpAsText(); |
| 87 testRunner.waitUntilDone(); |
| 88 } |
| 89 |
| 90 window.addEventListener('load', function() { |
| 91 if (window.testRunner) { |
| 92 document.getElementById("layertree").innerText = window.internals.layerT
reeAsText(document); |
| 93 testRunner.notifyDone(); |
| 94 } |
| 95 }, false); |
| 96 </script> |
| 97 </head> |
| 98 <body> |
| 99 <div id="willChangeAuto" class="shouldNotComposite"></div> |
| 100 <div id="willChangeZIndex" class="shouldNotComposite"></div> |
| 101 <div id="willChangeOpacity" class="shouldCompositeButNotHaveGpuHint"></div> |
| 102 <div id="willChangeContents" class="shouldCompositeAndHaveGpuHint"></div> |
| 103 <div id="willChangeWidth" class="shouldCompositeAndHaveGpuHint"></div> |
| 104 <div id="willChangeHeight" class="shouldCompositeAndHaveGpuHint"></div> |
| 105 <div id="willChangeBackgroundColor" class="shouldCompositeAndHaveGpuHint"></di
v> |
| 106 <div id="willChangeBackgroundPosition" class="shouldCompositeAndHaveGpuHint"><
/div> |
| 107 <div id="willChangeCombination" class="shouldCompositeAndHaveGpuHint"></div> |
| 108 |
| 109 <pre id="layertree"></pre> |
| 110 </body> |
| 111 </html> |
OLD | NEW |