blob: e9e82099de38807199aca34397a6e388304c425d [file] [edit]
<!DOCTYPE html><html>
<head>
<style>
canvas {
transform: translateZ(0px);
}
div {
will-change: transform;
width: 15px;
height: 15px;
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest() {
var c = document.getElementById('cvs_img2');
var ctx = c.getContext('2d');
ctx.fillStyle = 'green';
ctx.fillRect(0,0,c.width, c.height);
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<p>Tests whether an accelerated canvas creates a compositing layer.</p>
<canvas id="cvs_img2" width="10" height="10"></canvas>
<div></div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>