Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(483)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-globalAlpha-expected.html

Issue 2526693003: Make OffscreenCanvas 2D context support globalAlpha (Closed)
Patch Set: clean up tests Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <body>
3 <canvas id="canvas" width="600" height="100" ></canvas>
4 <script>
5 var canvas = document.createElement("canvas");
6 canvas.width = canvas.height = 100;
7 var context = canvas.getContext("2d");
8 context.fillStyle = 'green';
9 context.fillRect(0, 0, 100, 100);
10 var canvas2 = document.createElement("canvas");
11 var context2 = canvas2.getContext("2d");
12 var drawCanvas = document.getElementById("canvas");
13 var drawCtx = drawCanvas.getContext("2d");
14
15 context2.globalAlpha = 0.0;
16 context2.drawImage(canvas, 0, 0);
17 drawCtx.drawImage(canvas2, 0, 0, 100, 100, 0, 0, 100, 100);
18
19 context2.globalAlpha = 0.2;
20 context2.drawImage(canvas, 0, 0);
21 drawCtx.drawImage(canvas2, 0, 0, 100, 100, 100, 0, 100, 100);
22
23 context2.globalAlpha = 0.4;
24 context2.drawImage(canvas, 0, 0);
25 drawCtx.drawImage(canvas2, 0, 0, 100, 100, 200, 0, 100, 100);
26
27 context2.globalAlpha = 0.6;
28 context2.drawImage(canvas, 0, 0);
29 drawCtx.drawImage(canvas2, 0, 0, 100, 100, 300, 0, 100, 100);
30
31 context2.globalAlpha = 0.8;
32 context2.drawImage(canvas, 0, 0);
33 drawCtx.drawImage(canvas2, 0, 0, 100, 100, 400, 0, 100, 100);
34
35 context2.globalAlpha = 1.0;
36 context2.drawImage(canvas, 0, 0);
37 drawCtx.drawImage(canvas2, 0, 0, 100, 100, 500, 0, 100, 100);
38 </script>
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698