]> _ Git - fluidbook-html5.git/commitdiff
wip #5415
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Aug 2022 16:21:40 +0000 (18:21 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Aug 2022 16:21:46 +0000 (18:21 +0200)
js/libs/fluidbook/fluidbook.3dflip.js

index b62c2515920b35746a2448bad94c774687974dfc..e1bc93105a2b4fbab9ffd6277c2a2a2f358276a3 100644 (file)
@@ -43,9 +43,7 @@ function Fluidbook3DFlip(fluidbook) {
     this.errorInitWebGL = false;
 
     try {
-        this.testBenchmark(function () {
-            $this.init();
-        });
+        this.init();
     } catch (e) {
         this.errorInitWebGL = true;
         this.init();
@@ -57,41 +55,6 @@ Fluidbook3DFlip.prototype = {
         return !this.errorInitWebGL && this.fluidbook.support.IE === 0 && Modernizr.webgl;
     },
 
-    testBenchmark: function (cb) {
-        // IE doesn't need benchmark test, it's always treated as very low perf (
-        if (!this.webglEnabled()) {
-            cb();
-        }
-        var $this = this;
-        try {
-            var canvas = $this.jcontainer.find('canvas').get(0);
-            var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
-            var debugInfo = gl.getExtension('WEBGL_debug_renderer_info');
-            var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
-
-            if (this.fluidbook.settings.gupsc[renderer] !== undefined && this.fluidbook.settings.gupsc[renderer] !== null) {
-                this.benchmark = this.fluidbook.settings.gupsc[renderer];
-                cb();
-            } else {
-                $.ajax({
-                    url: "https://workshop.fluidbook.com/services/gup",
-                    dataType: 'json',
-                    data: {gup: btoa(renderer)},
-                    success: function (data) {
-                        $this.benchmark = parseInt(data);
-                        cb();
-                    },
-                    error: function () {
-                        cb();
-                    }
-                });
-            }
-        } catch (e) {
-            console.log(e);
-            cb();
-        }
-    },
-
     init: function () {
         var $this = this;