| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <style type="text/css"> |
| 5 .container { |
| 6 width: 60px; |
| 7 height: 60px; |
| 8 } |
| 9 #canvas-simple { |
| 10 /* No box decorations or background image. */ |
| 11 /* Solid color background only. */ |
| 12 background-color: green; |
| 13 } |
| 14 </style> |
| 15 <script> |
| 16 if (window.testRunner) |
| 17 testRunner.overridePreference("WebKitWebGLEnabled", "1"); |
| 18 |
| 19 function drawCanvas(canvasID) { |
| 20 var canvas = document.getElementById(canvasID); |
| 21 var gl = canvas.getContext("experimental-webgl"); |
| 22 |
| 23 // Fill NW quadrant with opaque blue. |
| 24 gl.enable(gl.SCISSOR_TEST); |
| 25 gl.scissor(0, canvas.height / 2, canvas.width / 2, canvas.height / 2
); |
| 26 gl.clearColor(0, 0, 1, 1); |
| 27 gl.clear(gl.COLOR_BUFFER_BIT); |
| 28 }; |
| 29 |
| 30 function doTest() { |
| 31 // Simple background can be direct-composited with content-layer. |
| 32 // The container GraphicsLayer does not paint anything. |
| 33 drawCanvas('canvas-simple'); |
| 34 }; |
| 35 window.addEventListener('load', doTest, false); |
| 36 </script> |
| 37 </head> |
| 38 |
| 39 <body> |
| 40 <div class="container"> |
| 41 <canvas id="canvas-simple" width="50" height="50"></canvas> |
| 42 </div> |
| 43 </body> |
| 44 </html> |
| OLD | NEW |