'WebGL Hardware Acceleration - failIfMajorPerformanceCaveat no longer working on Chrome
Previously I was able to detect whether or not the browser has Hardware Acceleration enabled, by using the failIfMajorPerformanceCaveat flag.
const canvas = document.createElement("canvas");
canvas.setAttribute("width", "1");
canvas.setAttribute("height", "1");
const body = document.getElementsByTagName("body")[0];
body.appendChild(canvas);
const gl = canvas.getContext("webgl", { failIfMajorPerformanceCaveat: true });
body.removeChild(canvas);
return !gl;
However, this flag no longer seems to fail and the canvas context is still created. I'm on the latest version of Chrome (101.0.4951.67) and using Windows. Can anyone help me?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|