blob: 2833849da67f06693a228d9d3cec8c5ba56c8a8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.layer.render-opportunities.transferToImageBitmap</title>
<h1>2d.layer.render-opportunities.transferToImageBitmap</h1>
<p class="desc">Checks that transferToImageBitmap flushes and rebuilds the state stack.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'purple';
ctx.globalAlpha = 0.5;
ctx.beginLayer({filter: 'dropShadow', dx: -2, dy: 2});
ctx.fillStyle = 'grey';
ctx.fillRect(70, 70, 75, 50);
ctx.fillStyle = 'orange';
ctx.fillRect(80, 80, 75, 50);
ctx.endLayer();
ctx.fillRect(80, 40, 75, 50);
</script>
|