4 <!-- Check for compositing WebGL layer and accelerated background-color layer. -->
5 <!-- On load, there is not WebGL layer. WebGL layer is created on the fly. -->
20 background-color: rgba(0, 0, 255, 0.5);
26 transform: translateZ(0);
29 <script type="text/javascript" charset="utf-8">
30 if (window.testRunner) {
31 testRunner.waitUntilDone();
32 testRunner.dumpAsTextWithPixelResults();
37 window.setTimeout(function() {
40 window.internals.forceCompositingUpdate(document);
41 if (window.testRunner) {
42 window.setTimeout(function() {
43 testRunner.notifyDone();
49 function initWebGL(vshader, fshader, attribs, clearColor, clearDepth)
51 var canvas = document.getElementById('canvas');
52 var gl = canvas.getContext("webgl");
54 alert("No WebGL context found");
58 gl.clearColor(clearColor[0], clearColor[1], clearColor[2], clearColor[3]);
59 gl.clearDepth(clearDepth);
61 gl.enable(gl.DEPTH_TEST);
63 gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
68 function makeWebGLLayer()
70 var gl = initWebGL("", "", [], [ 1.0, 0.0, 0.0, 1.0 ], 1);
71 gl.viewport(0, 0, 200, 200);
72 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
75 window.addEventListener('load', doTest, false);
80 <canvas id="canvas"></canvas>
81 <div class="blue composited"></div>