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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/borders/border-radius-mask-canvas-with-shadow.html

Issue 2192493003: Enable GPU acceleration in 2D OffscreenCanvases on main thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix dev tools failure Created 4 years, 4 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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 canvas { 5 canvas {
6 background-color: gray; 6 background-color: gray;
7 border-radius: 40px 200px 10px 200px; 7 border-radius: 40px 200px 10px 200px;
8 padding: 10px; 8 padding: 10px;
9 margin: 20px; 9 margin: 20px;
10 border: 5px solid red; 10 border: 5px solid red;
11 box-shadow: 0 0 8px 8px #888; 11 box-shadow: 0 0 8px 8px #888;
12 } 12 }
13 </style> 13 </style>
14 </head> 14 </head>
15 <body> 15 <body>
16 <h3>It passes if:</h3> 16 <h3>It passes if:</h3>
17 <ul> 17 <ul>
18 <li>the canvas element has 8px gray shadow around</li> 18 <li>the canvas element has 8px gray shadow around</li>
19 <li>the canvas content has rounded corners</li> 19 <li>the canvas content has rounded corners</li>
20 </ul> 20 </ul>
21 <canvas id="theCanvas" width="257" height="257"></canvas> 21 <canvas id="theCanvas" width="257" height="257"></canvas>
22 <script> 22 <script>
23 if (window.internals) { 23 if (window.internals) {
24 internals.settings.setAccelerated2dCanvasEnabled(true); 24 internals.runtimeFlags.accelerated2dCanvasEnabled = true;
25 } 25 }
26 var context = theCanvas.getContext('2d'); 26 var context = theCanvas.getContext('2d');
27 context.fillStyle = 'green'; 27 context.fillStyle = 'green';
28 context.fillRect(0, 0, theCanvas.width, theCanvas.width); 28 context.fillRect(0, 0, theCanvas.width, theCanvas.width);
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698