From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../extra/50x50pixel-black-with-red-triangle.png | Bin 0 -> 3032 bytes .../checkout/extra/big-fbos-example.html | 277 +++++++++++++++++++ .../checkout/extra/buffer-gc-stress.html | 176 ++++++++++++ .../webgl-conf/checkout/extra/buffer-sizes.html | 289 ++++++++++++++++++++ .../checkout/extra/canvas-compositing-test.html | 109 ++++++++ .../checkout/extra/canvas-compositing-test.png | Bin 0 -> 212531 bytes .../extra/constant-index-out-of-range.html | 240 +++++++++++++++++ .../context-creation-and-destruction-stress.html | 56 ++++ .../extra/cube-map-uploads-out-of-order.html | 112 ++++++++ .../checkout/extra/fbo-lost-context.html | 223 ++++++++++++++++ .../checkout/extra/lots-of-polys-example.html | 110 ++++++++ .../extra/lots-of-polys-shader-example.html | 176 ++++++++++++ .../extra/multisample-corruption-stress.html | 58 ++++ .../webgl-conf/checkout/extra/offscreen-issue.html | 64 +++++ .../extra/out-of-bounds-uniform-array-access.html | 126 +++++++++ .../webgl-conf/checkout/extra/out-of-memory.html | 105 ++++++++ .../checkout/extra/out-of-resources.html | 141 ++++++++++ .../webgl-conf/checkout/extra/out-of-vram.html | 135 ++++++++++ .../checkout/extra/point-no-attributes-stress.html | 82 ++++++ .../webgl-conf/checkout/extra/program-test-1.html | 101 +++++++ .../checkout/extra/readpixels-after-alert.html | 86 ++++++ .../test/webgl-conf/checkout/extra/sample-100.png | Bin 0 -> 960 bytes .../test/webgl-conf/checkout/extra/sample-200.png | Bin 0 -> 2364 bytes .../test/webgl-conf/checkout/extra/sample-400.png | Bin 0 -> 5181 bytes .../test/webgl-conf/checkout/extra/sample.svg | 4 + .../extra/simulated-attrib-0-bug-test.html | 57 ++++ .../checkout/extra/slow-shader-example.html | 133 +++++++++ .../checkout/extra/tex-image-with-video-test.html | 48 ++++ .../checkout/extra/tex-image-with-video-test.js | 174 ++++++++++++ .../extra/texture-allocation-stress-test.html | 68 +++++ .../webgl-conf/checkout/extra/texture-sizing.html | 250 +++++++++++++++++ .../extra/webgl-drawelements-validation.html | 163 ++++++++++++ .../test/webgl-conf/checkout/extra/webgl-info.html | 296 +++++++++++++++++++++ .../checkout/extra/webgl-translate-shader.html | 171 ++++++++++++ 34 files changed, 4030 insertions(+) create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/50x50pixel-black-with-red-triangle.png create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/big-fbos-example.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/buffer-gc-stress.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/buffer-sizes.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.png create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/constant-index-out-of-range.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/context-creation-and-destruction-stress.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/cube-map-uploads-out-of-order.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/fbo-lost-context.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-example.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-shader-example.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/multisample-corruption-stress.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/offscreen-issue.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/out-of-bounds-uniform-array-access.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/out-of-memory.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/out-of-resources.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/out-of-vram.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/point-no-attributes-stress.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/program-test-1.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/readpixels-after-alert.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/sample-100.png create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/sample-200.png create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/sample-400.png create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/sample.svg create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/simulated-attrib-0-bug-test.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/slow-shader-example.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.js create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/texture-allocation-stress-test.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/texture-sizing.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/webgl-drawelements-validation.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/webgl-info.html create mode 100644 dom/canvas/test/webgl-conf/checkout/extra/webgl-translate-shader.html (limited to 'dom/canvas/test/webgl-conf/checkout/extra') diff --git a/dom/canvas/test/webgl-conf/checkout/extra/50x50pixel-black-with-red-triangle.png b/dom/canvas/test/webgl-conf/checkout/extra/50x50pixel-black-with-red-triangle.png new file mode 100644 index 000000000..4ec975107 Binary files /dev/null and b/dom/canvas/test/webgl-conf/checkout/extra/50x50pixel-black-with-red-triangle.png differ diff --git a/dom/canvas/test/webgl-conf/checkout/extra/big-fbos-example.html b/dom/canvas/test/webgl-conf/checkout/extra/big-fbos-example.html new file mode 100644 index 000000000..8f6ce2049 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/big-fbos-example.html @@ -0,0 +1,277 @@ + + + + + + +WebGL Big FBO Test + + + + + + + +
+
+ + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/buffer-gc-stress.html b/dom/canvas/test/webgl-conf/checkout/extra/buffer-gc-stress.html new file mode 100644 index 000000000..4b8dc23b2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/buffer-gc-stress.html @@ -0,0 +1,176 @@ + + + + + + +Float32Array garbage collection test + + + + + + +
+
+ + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/buffer-sizes.html b/dom/canvas/test/webgl-conf/checkout/extra/buffer-sizes.html new file mode 100644 index 000000000..5238ec20e --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/buffer-sizes.html @@ -0,0 +1,289 @@ + + + + + + +Buffer allocation test + + + + + +
+
+
+ + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.html b/dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.html new file mode 100644 index 000000000..654c458b7 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.html @@ -0,0 +1,109 @@ + + + + + + +Canvas Compositing Test + + + + + +Below are 2 50x50 pixel canvas but using CSS to display them at 100x100 pixels.
+They are solid black with a red triangle
+They each have a 10px CSS solid black border around them.
+Depending on how the browser composites the canvas with the page they will get +a white outline
+
+2d canvas
+ +
+
+3d canvas
+
+ +
+
+img tag
+ +
+
+ + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.png b/dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.png new file mode 100644 index 000000000..ba80dbe76 Binary files /dev/null and b/dom/canvas/test/webgl-conf/checkout/extra/canvas-compositing-test.png differ diff --git a/dom/canvas/test/webgl-conf/checkout/extra/constant-index-out-of-range.html b/dom/canvas/test/webgl-conf/checkout/extra/constant-index-out-of-range.html new file mode 100644 index 000000000..de563c1a2 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/constant-index-out-of-range.html @@ -0,0 +1,240 @@ + + + + + + +Indexing with a constant expression should compile only if the index is in range + + + + + + + + + + + + + +
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/context-creation-and-destruction-stress.html b/dom/canvas/test/webgl-conf/checkout/extra/context-creation-and-destruction-stress.html new file mode 100644 index 000000000..6822bc234 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/context-creation-and-destruction-stress.html @@ -0,0 +1,56 @@ + + + + + + +Test that contexts are freed and garbage collected reasonably + + + + + + +
+
+ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/cube-map-uploads-out-of-order.html b/dom/canvas/test/webgl-conf/checkout/extra/cube-map-uploads-out-of-order.html new file mode 100644 index 000000000..489aea6ca --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/cube-map-uploads-out-of-order.html @@ -0,0 +1,112 @@ + + + + + + +WebGL cube map out of order upload test. + + + + + + +
+
+ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/fbo-lost-context.html b/dom/canvas/test/webgl-conf/checkout/extra/fbo-lost-context.html new file mode 100644 index 000000000..a9aa71b47 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/fbo-lost-context.html @@ -0,0 +1,223 @@ + + + + + + +WebGL FBO Lost Context Test + + + + + + +
+
+ + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-example.html b/dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-example.html new file mode 100644 index 000000000..519f023cf --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-example.html @@ -0,0 +1,110 @@ + + + + + + +WebGL Lots of polygons example. + + + + + + + +
+
+ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-shader-example.html b/dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-shader-example.html new file mode 100644 index 000000000..78f40ae8c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/lots-of-polys-shader-example.html @@ -0,0 +1,176 @@ + + + + + + +WebGL Lots of polygons example. + + + + + + +
+
+ + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/multisample-corruption-stress.html b/dom/canvas/test/webgl-conf/checkout/extra/multisample-corruption-stress.html new file mode 100644 index 000000000..16cde8b20 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/multisample-corruption-stress.html @@ -0,0 +1,58 @@ + + + + + + +WebGL Multisample Renderbuffer Corruption Test + + + + + + + +
+
+ + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/offscreen-issue.html b/dom/canvas/test/webgl-conf/checkout/extra/offscreen-issue.html new file mode 100644 index 000000000..598be0e8a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/offscreen-issue.html @@ -0,0 +1,64 @@ + + + + + + + + + +
content that is tall like several articles
+ + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/out-of-bounds-uniform-array-access.html b/dom/canvas/test/webgl-conf/checkout/extra/out-of-bounds-uniform-array-access.html new file mode 100644 index 000000000..4328d71eb --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/out-of-bounds-uniform-array-access.html @@ -0,0 +1,126 @@ + + + + + + +WebGL out of bounds uniform array access. + + + + + +
+
+
elem mult:
+ +
line width:
+ + + + + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/out-of-memory.html b/dom/canvas/test/webgl-conf/checkout/extra/out-of-memory.html new file mode 100644 index 000000000..88b033e93 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/out-of-memory.html @@ -0,0 +1,105 @@ + + + + + + +WebGL Out Of Memory Test + + + + + +
+
+ + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/out-of-resources.html b/dom/canvas/test/webgl-conf/checkout/extra/out-of-resources.html new file mode 100644 index 000000000..86028f952 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/out-of-resources.html @@ -0,0 +1,141 @@ + + + + + + +WebGL Out Of Resources Test + + + + + + +
+
+ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/out-of-vram.html b/dom/canvas/test/webgl-conf/checkout/extra/out-of-vram.html new file mode 100644 index 000000000..16a3d3ef7 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/out-of-vram.html @@ -0,0 +1,135 @@ + + + + + + +WebGL Out Of VRAM Test + + + + + +
+
+ + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/point-no-attributes-stress.html b/dom/canvas/test/webgl-conf/checkout/extra/point-no-attributes-stress.html new file mode 100644 index 000000000..dcb2a272c --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/point-no-attributes-stress.html @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/program-test-1.html b/dom/canvas/test/webgl-conf/checkout/extra/program-test-1.html new file mode 100644 index 000000000..9cfdfb2bd --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/program-test-1.html @@ -0,0 +1,101 @@ + + + + + + + + + + +

Should be green in the rectangle below:

+ +
+ + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/readpixels-after-alert.html b/dom/canvas/test/webgl-conf/checkout/extra/readpixels-after-alert.html new file mode 100644 index 000000000..8c2a7419a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/readpixels-after-alert.html @@ -0,0 +1,86 @@ + + + + + + +WebGL Behavior After Alert and Read Pixels Test + + + + + + + +
Verify WebGL behavior after an alert and then a readPixels()
+
+ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/sample-100.png b/dom/canvas/test/webgl-conf/checkout/extra/sample-100.png new file mode 100644 index 000000000..197c869b6 Binary files /dev/null and b/dom/canvas/test/webgl-conf/checkout/extra/sample-100.png differ diff --git a/dom/canvas/test/webgl-conf/checkout/extra/sample-200.png b/dom/canvas/test/webgl-conf/checkout/extra/sample-200.png new file mode 100644 index 000000000..89f2b782a Binary files /dev/null and b/dom/canvas/test/webgl-conf/checkout/extra/sample-200.png differ diff --git a/dom/canvas/test/webgl-conf/checkout/extra/sample-400.png b/dom/canvas/test/webgl-conf/checkout/extra/sample-400.png new file mode 100644 index 000000000..aaee3ce0d Binary files /dev/null and b/dom/canvas/test/webgl-conf/checkout/extra/sample-400.png differ diff --git a/dom/canvas/test/webgl-conf/checkout/extra/sample.svg b/dom/canvas/test/webgl-conf/checkout/extra/sample.svg new file mode 100644 index 000000000..dfca52402 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/sample.svg @@ -0,0 +1,4 @@ + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/simulated-attrib-0-bug-test.html b/dom/canvas/test/webgl-conf/checkout/extra/simulated-attrib-0-bug-test.html new file mode 100644 index 000000000..c86ff6eea --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/simulated-attrib-0-bug-test.html @@ -0,0 +1,57 @@ + + + + + +Simulated Attrib 0 Bug Test + + + + +
Simulated Attrib 0 Bug Test
+
+
+ + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/slow-shader-example.html b/dom/canvas/test/webgl-conf/checkout/extra/slow-shader-example.html new file mode 100644 index 000000000..0970a3842 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/slow-shader-example.html @@ -0,0 +1,133 @@ + + + + + + +WebGL Slow Shader example. + + + + + + + +
+
+ + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.html b/dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.html new file mode 100644 index 000000000..3a20ad236 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + +
+
+ + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.js b/dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.js new file mode 100644 index 000000000..e6dd62c9a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/tex-image-with-video-test.js @@ -0,0 +1,174 @@ +/* +** Copyright (c) 2012 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +// This block needs to be outside the onload handler in order for this +// test to run reliably in WebKit's test harness (at least the +// Chromium port). https://bugs.webkit.org/show_bug.cgi?id=87448 +initTestingHarness(); + +var old = debug; +var debug = function(msg) { + console.log(msg); + old(msg); +}; + +function generateTest(pixelFormat, pixelType, prologue) { + var wtu = WebGLTestUtils; + var gl = null; + var textureLoc = null; + var successfullyParsed = false; + + // Test each format separately because many browsers implement each + // differently. Some might be GPU accelerated, some might not. Etc... + var videos = [ + { src: "../resources/red-green.mp4" , type: 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', }, + { src: "../resources/red-green.webmvp8.webm", type: 'video/webm; codecs="vp8, vorbis"', }, + { src: "../resources/red-green.webmvp9.webm", type: 'video/webm; codecs="vp9"', }, + { src: "../resources/red-green.theora.ogv", type: 'video/ogg; codecs="theora, vorbis"', }, + ]; + + var videoNdx = 0; + var video; + + function runNextVideo() { + if (video) { + video.pause(); + } + + if (videoNdx == videos.length) { + finishTest(); + return; + } + + var info = videos[videoNdx++]; + debug(""); + debug("testing: " + info.type); + video = document.createElement("video"); + var canPlay = true; + if (!video.canPlayType) { + testFailed("video.canPlayType required method missing"); + runNextVideo(); + return; + } + + if(!video.canPlayType(info.type).replace(/no/, '')) { + debug(info.type + " unsupported"); + runNextVideo(); + return; + }; + + document.body.appendChild(video); + video.type = info.type; + video.crossOrigin = 'anonymous'; + video.src = info.src; + wtu.startPlayingAndWaitForVideo(video, runTest); + } + + var init = function() + { + description('Verify texImage2D and texSubImage2D code paths taking video elements (' + pixelFormat + '/' + pixelType + ')'); + + gl = wtu.create3DContext("example"); + + if (!prologue(gl)) { + finishTest(); + return; + } + + var program = wtu.setupTexturedQuad(gl); + + gl.clearColor(0,0,0,1); + gl.clearDepth(1); + + textureLoc = gl.getUniformLocation(program, "tex"); + runNextVideo(); + } + + function runOneIteration(videoElement, useTexSubImage2D, flipY, topColor, bottomColor) + { + debug('Testing ' + (useTexSubImage2D ? 'texSubImage2D' : 'texImage2D') + + ' with flipY=' + flipY); + gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); + // Disable any writes to the alpha channel + gl.colorMask(1, 1, 1, 0); + var texture = gl.createTexture(); + // Bind the texture to texture unit 0 + gl.bindTexture(gl.TEXTURE_2D, texture); + // Set up texture parameters + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + // Set up pixel store parameters + gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY); + gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); + // Upload the videoElement into the texture + if (useTexSubImage2D) { + // Initialize the texture to black first + gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], + videoElement.videoWidth, videoElement.videoHeight, 0, + gl[pixelFormat], gl[pixelType], null); + gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl[pixelFormat], gl[pixelType], videoElement); + } else { + gl.texImage2D(gl.TEXTURE_2D, 0, gl[pixelFormat], gl[pixelFormat], gl[pixelType], videoElement); + } + + var c = document.createElement("canvas"); + c.width = 16; + c.height = 16; + c.style.border = "1px solid black"; + var ctx = c.getContext("2d"); + ctx.drawImage(videoElement, 0, 0, 16, 16); + document.body.appendChild(c); + + // Point the uniform sampler to texture unit 0 + gl.uniform1i(textureLoc, 0); + // Draw the triangles + wtu.clearAndDrawUnitQuad(gl, [0, 0, 0, 255]); + // Check a few pixels near the top and bottom and make sure they have + // the right color. + var tolerance = 5; + debug("Checking lower left corner"); + wtu.checkCanvasRect(gl, 4, 4, 2, 2, bottomColor, + "shouldBe " + bottomColor, tolerance); + debug("Checking upper left corner"); + wtu.checkCanvasRect(gl, 4, gl.canvas.height - 8, 2, 2, topColor, + "shouldBe " + topColor, tolerance); + } + + function runTest(videoElement) + { + var red = [255, 0, 0]; + var green = [0, 255, 0]; + runOneIteration(videoElement, false, true, red, green); + runOneIteration(videoElement, false, false, green, red); + runOneIteration(videoElement, true, true, red, green); + runOneIteration(videoElement, true, false, green, red); + + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "should be no errors"); + + runNextVideo(); + } + + return init; +} diff --git a/dom/canvas/test/webgl-conf/checkout/extra/texture-allocation-stress-test.html b/dom/canvas/test/webgl-conf/checkout/extra/texture-allocation-stress-test.html new file mode 100644 index 000000000..2c423e02a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/texture-allocation-stress-test.html @@ -0,0 +1,68 @@ + + + + + + +Tests that resources allocated by a WebGL context are freed in a reasonable timeframe. + + + + + +
+
+ + + + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/texture-sizing.html b/dom/canvas/test/webgl-conf/checkout/extra/texture-sizing.html new file mode 100644 index 000000000..4cdcf64a1 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/texture-sizing.html @@ -0,0 +1,250 @@ + + + + +Testing resolution of texture uploads + + + + + +
+
+

IMG to SVG with 200x200 attributes

+
+
+ +
+
+
+
+

+
+
+
+
+

IMG to 100x100 PNG with 200x200 attributes

+
+
+ +
+
+
+
+

+
+
+
+
+

IMG to 200x200 PNG with 200x200 attributes

+
+
+ +
+
+
+
+

+
+
+
+
+

IMG to 400x400 PNG with 200x200 attributes

+
+
+ +
+
+
+
+

+
+
+
+
+

IMG SRCSET to multiple PNGs with 200x200 attributes

+
+
+ +
+
+
+
+

+
+
+
+
+

IMG to SVG with no attributes - 200x200 sizing via CSS

+
+
+ +
+
+
+
+

+
+
+
+
+

IMG to 400x400 PNG with no attributes - 200x200 sizing via CSS

+
+
+ +
+
+
+
+

+
+
+
+
+

+ IMG to SVG with no attributes and no sizing via CSS
+ (although the width and height of the container set a size) +

+
+
+ +
+
+
+
+

+
+
+
+
+

Out of page SVG with no dimensions

+
+
+ Not a child of document +
+
+
+
+

+
+
+
+
+

Out of page SVG with 200x200 specified

+
+
+ Not a child of document +
+
+
+
+

+
+
+ + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/webgl-drawelements-validation.html b/dom/canvas/test/webgl-conf/checkout/extra/webgl-drawelements-validation.html new file mode 100644 index 000000000..74f15608a --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/webgl-drawelements-validation.html @@ -0,0 +1,163 @@ + + + + + +Micro-benchmark for WebGL drawElements index validation + + + + + +

Micro-benchmark for WebGL drawElements index validation

+

Note that these test cases are completely artificial, and their results only very rough indicators of the performance of a specific part of the system.

+

The benchmark does not perform any drawing, but rather measures the time the browser takes to upload indices and to check if there are out-of-range indices.

+ + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/webgl-info.html b/dom/canvas/test/webgl-conf/checkout/extra/webgl-info.html new file mode 100644 index 000000000..86b4d0c05 --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/webgl-info.html @@ -0,0 +1,296 @@ + + + + + + +WebGL Information + + + + + +

WebGL Info

+
+

WebGL Extensions

+
+ + + + diff --git a/dom/canvas/test/webgl-conf/checkout/extra/webgl-translate-shader.html b/dom/canvas/test/webgl-conf/checkout/extra/webgl-translate-shader.html new file mode 100644 index 000000000..2cccd47ea --- /dev/null +++ b/dom/canvas/test/webgl-conf/checkout/extra/webgl-translate-shader.html @@ -0,0 +1,171 @@ + + + + + + +WebGL Shader Translator + + + + + + +

WebGL Shader Translator

+

This page uses the browser's built-in shader translation facilities to show how a shader +is changed before being passed on to the underlying platform's graphics driver.

+ +

WebGL GLSL shader

+ +

+ + +

+

Shader translated for graphics driver

+ +

Enabled shader extensions

+

None

+

Shader info log

+ + + + + -- cgit v1.2.3