tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

webgl-compressed-texture-size-limit.html (1309B)


      1 <!--
      2 Copyright (c) 2019 The Khronos Group Inc.
      3 Use of this source code is governed by an MIT-style license that can be
      4 found in the LICENSE.txt file.
      5 -->
      6 
      7 <!DOCTYPE html>
      8 <html>
      9 <head>
     10 <meta charset="utf-8">
     11 <title>WebGL compressed texture size limit conformance test</title>
     12 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
     13 <script src="../../js/js-test-pre.js"></script>
     14 <script src="../../js/webgl-test-utils.js"></script>
     15 <script src="../../js/tests/webgl-compressed-texture-size-limit.js"></script>
     16 </head>
     17 <body>
     18 <canvas id="example" width="32" height="32" style="width: 40px; height: 40px;"></canvas>
     19 <div id="description"></div>
     20 <div id="console"></div>
     21 <script>
     22 "use strict";
     23 enableJSTestPreVerboseLogging();
     24 description("Checks size limit of the webgl compressed textures")
     25 
     26 // ArrayBuffers can be at most 4GB (minus 1 byte), but any allocations larger than 1 GB are unreliable in practice. So limit allocations to 1 GB.
     27 // Textures that are wide in just one dimension can still be used to test max TEXTURE_2D size limit even if we can't allocate space for huge square textures.
     28 // Use a fairly conservative limit for positive test cube map size so OOM is avoided.
     29 runCompressedTextureSizeLimitTest(Math.pow(2, 30), 2048);
     30 
     31 var successfullyParsed = true;
     32 </script>
     33 </body>
     34 </html>