Chromium Code Reviews| Index: LayoutTests/compositing/will-change/gpu-rasterization-hint-added.html |
| diff --git a/LayoutTests/compositing/will-change/gpu-rasterization-hint-added.html b/LayoutTests/compositing/will-change/gpu-rasterization-hint-added.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..64e6c20973265e69a044f9390091b448cf6a51ca |
| --- /dev/null |
| +++ b/LayoutTests/compositing/will-change/gpu-rasterization-hint-added.html |
| @@ -0,0 +1,64 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| + <style> |
| + #container { |
| + will-change: top; |
| + position: absolute; |
| + z-index: 0; |
| + left: 200px; |
| + top: 100px; |
| + width: 100px; |
| + height: 100px; |
| + background-color: blue; |
| + } |
| + |
| + #willChangeOpacity { |
| + position: absolute; |
| + left: 50px; |
| + top: 50px; |
| + width: 75px; |
| + height: 75px; |
| + background-color: green; |
| + will-change: opacity; |
| + } |
| + </style> |
| + <script type="text/javascript"> |
| + if (window.internals) { |
| + window.internals.settings.setAcceleratedCompositingForGpuRasterizationHintEnabled(true); |
| + // Force an update of the compositing triggers. |
|
Ian Vollick
2014/04/14 17:02:45
This is hacky. If forceCompositingUpdate doesn't w
ajuma
2014/04/14 18:09:34
Switched this to forceCompositingUpdate. See also
|
| + window.internals.layerTreeAsText(document); |
| + } |
| + |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
|
Ian Vollick
2014/04/14 17:02:45
No need for wait until done (or notify done), I do
ajuma
2014/04/14 18:09:34
Done.
|
| + } |
| + |
| + function doTest() |
| + { |
| + if (window.internals) { |
| + window.internals.forceCompositingUpdate(document); |
| + } |
| + // Adding "will-change: contents" to the container div should |
| + // stop its child from compositing. |
| + document.getElementById("container").style.willChange = "contents"; |
| + if (window.testRunner) { |
| + document.getElementById("layertree").innerText = window.internals.layerTreeAsText(document); |
| + testRunner.notifyDone(); |
| + } |
| + } |
| + |
| + window.addEventListener('load', doTest, false); |
| + </script> |
| +</head> |
| + |
| +<body> |
| + <div id="container"> |
| + <div id="willChangeOpacity"></div> |
| + </div> |
| + |
| + <pre id="layertree"></pre> |
| +</body> |
| + |
| +</html> |