From: Vincent Vanwaelscappel Date: Wed, 24 Aug 2022 16:21:40 +0000 (+0200) Subject: wip #5415 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8139f67fcea4c9d9b0f6bc23fd2d48c84b3e845e;p=fluidbook-html5.git wip #5415 --- diff --git a/js/libs/fluidbook/fluidbook.3dflip.js b/js/libs/fluidbook/fluidbook.3dflip.js index b62c2515..e1bc9310 100644 --- a/js/libs/fluidbook/fluidbook.3dflip.js +++ b/js/libs/fluidbook/fluidbook.3dflip.js @@ -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;