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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/borders/border-radius-mask-canvas-border.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: 10px solid red; 7 border: 10px solid red;
8 border-radius: 200px 100px 0px 0px; 8 border-radius: 200px 100px 0px 0px;
9 } 9 }
10 </style> 10 </style>
11 </head> 11 </head>
12 <body> 12 <body>
13 <h3>It passes if:</h3> 13 <h3>It passes if:</h3>
14 <ul> 14 <ul>
15 <li>the canvas content has rounded corners (top-left and top-right)</li> 15 <li>the canvas content has rounded corners (top-left and top-right)</li>
16 <li>the 10px red border is visible around the canvas content</li> 16 <li>the 10px red border is visible around the canvas content</li>
17 <li>gray border is not visible</li> 17 <li>gray border is not visible</li>
18 </ul> 18 </ul>
19 <canvas id="theCanvas" width="257" height="257"></canvas> 19 <canvas id="theCanvas" width="257" height="257"></canvas>
20 <script> 20 <script>
21 if (window.internals) { 21 if (window.internals) {
22 internals.settings.setAccelerated2dCanvasEnabled(true); 22 internals.runtimeFlags.accelerated2dCanvasEnabled = true;
23 } 23 }
24 var context = theCanvas.getContext('2d'); 24 var context = theCanvas.getContext('2d');
25 context.fillStyle = 'green'; 25 context.fillStyle = 'green';
26 context.fillRect(0, 0, theCanvas.width, theCanvas.width); 26 context.fillRect(0, 0, theCanvas.width, theCanvas.width);
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698