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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/OffscreenCanvas-filter-in-worker-expected.html

Issue 2326633002: Adds filter support for offscreen canvas (Closed)
Patch Set: Sync Created 3 years, 10 months 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 <!DOCTYPE html>
2 <canvas id='output0' width='100' height='100'></canvas>
3 <canvas id='output1' width='100' height='100'></canvas>
4 <canvas id='output2' width='100' height='100'></canvas>
5 <canvas id='output3' width='100' height='100'></canvas>
6 <canvas id='output4' width='100' height='100'></canvas>
7 <canvas id='output5' width='100' height='100'></canvas>
8 <canvas id='output6' width='100' height='100'></canvas>
9 <canvas id='output7' width='100' height='100'></canvas>
10 <canvas id='output8' width='100' height='100'></canvas>
11 <canvas id='output9' width='100' height='100'></canvas>
12 <canvas id='output10' width='100' height='100'></canvas>
13 <canvas id='output11' width='100' height='100'></canvas>
14
15 <script>
16 var patternCanvas = document.createElement('canvas');
17 patternCanvas.width = 30;
18 patternCanvas.height = 30;
19 var patternCtx = patternCanvas.getContext('2d');
20 patternCtx.fillStyle = '#A00';
21 patternCtx.fillRect(0, 0, 15, 15);
22 patternCtx.fillStyle = '#0A0';
23 patternCtx.fillRect(15, 0, 15, 15);
24 patternCtx.fillStyle = '#00A';
25 patternCtx.fillRect(0, 15, 15, 15);
26 patternCtx.fillStyle = "#AA0";
27 patternCtx.fillRect(15, 15, 15, 15);
28
29 var paint = function(id, filter) {
30 var c = document.getElementById(id);
31 var ctx = c.getContext('2d');
32 ctx.filter = filter;
33 ctx.drawImage(patternCanvas, 5, 5);
34 ctx.drawImage(patternCanvas, 35, 35);
35 ctx.drawImage(patternCanvas, 65, 65);
36 return ctx;
37 };
38
39 paint('output0', "none");
40 paint('output1', "blur(10px)");
41 paint('output2', "brightness(40%)");
42 paint('output3', "contrast(20%)");
43 paint('output4', "drop-shadow(0 0 5px green)");
44 paint('output5', "grayscale(100%)");
45 paint('output6', "invert(100%)");
46 paint('output7', "opacity(50%)");
47 paint('output8', "saturate(20%)");
48 paint('output9', "sepia(100%)");
49 paint('output10', "sepia(1) hue-rotate(200deg)");
50 paint('output11', "url(#url)");
51 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698