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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-globalAlpha.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-globalAlpha-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3 <canvas id="canvas" width="600" height="100" ></canvas>
4 <script>
5 var canvas = document.getElementById("canvas");
6 var context = canvas.getContext("2d");
7
8 var offscreenCanvas1 = new OffscreenCanvas(100, 100);
9 var ctx1 = offscreenCanvas1.getContext('2d');
10 ctx1.fillStyle = 'green';
11 ctx1.fillRect(0, 0, 100, 100);
12 var offscreenCanvas2 = new OffscreenCanvas(100, 100);
13 var ctx2 = offscreenCanvas2.getContext('2d');
14
15 ctx2.globalAlpha = 0.0;
16 ctx2.drawImage(offscreenCanvas1, 0, 0);
17 context.drawImage(offscreenCanvas2, 0, 0, 100, 100, 0, 0, 100, 100);
18
19 ctx2.globalAlpha = 0.2;
20 ctx2.drawImage(offscreenCanvas1, 0, 0);
21 context.drawImage(offscreenCanvas2, 0, 0, 100, 100, 100, 0, 100, 100);
22
23 ctx2.globalAlpha = 0.4;
24 ctx2.drawImage(offscreenCanvas1, 0, 0);
25 context.drawImage(offscreenCanvas2, 0, 0, 100, 100, 200, 0, 100, 100);
26
27 ctx2.globalAlpha = 0.6;
28 ctx2.drawImage(offscreenCanvas1, 0, 0);
29 context.drawImage(offscreenCanvas2, 0, 0, 100, 100, 300, 0, 100, 100);
30
31 ctx2.globalAlpha = 0.8;
32 ctx2.drawImage(offscreenCanvas1, 0, 0);
33 context.drawImage(offscreenCanvas2, 0, 0, 100, 100, 400, 0, 100, 100);
34
35 ctx2.globalAlpha = 1.0;
36 ctx2.drawImage(offscreenCanvas1, 0, 0);
37 context.drawImage(offscreenCanvas2, 0, 0, 100, 100, 500, 0, 100, 100);
38 </script>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-2d-globalAlpha-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698