blob: 23adb414665af716c9791a6b90c23803bb846c00 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<meta name="fuzzy" content="maxDifference=48; totalPixels=278" />
</head>
<body>
<canvas id="offscreen" width="200" height="200" style="border: 1px solid black; clip-path: circle(30%); background-color:blue"></canvas>
<script>
const canvas = document.getElementById('offscreen');
const offscreenCanvas = canvas.transferControlToOffscreen();
const offscreenContext = offscreenCanvas.getContext('2d');
if (window.testRunner)
testRunner.waitUntilDone();
requestAnimationFrame(function() {
const square = new Path2D();
square.rect(50, 50, 100, 100);
offscreenContext.fillStyle = 'red';
offscreenContext.fill(square);
requestAnimationFrame(function() {
if (window.testRunner)
testRunner.notifyDone();
});
});
</script>
</body>
</html>